Dataset creation filter with two conditions

I have a SPICE dataset that pulls in CUR data. I want to limit the ingestion to rows by (unblended_cost != 0 AND line_item_usage_type !=ABC123). Is it possible to replicate this sort of a filter at dataset creation time?

Hi @jackattack6800

Yes. You can add filters in the dataset to apply the filters you want to restrict data.

If there are specifics or issues in doing so you can describe the same and we can look at it and respond.

Regards,
Giri

How do you create a filter that excludes rows based on two conditions? I need to exclude rows where usage_type !=ABC123 AND unblended_cost !=0. Both conditions need to be met on a single row for the exclusion.

If I enter them as separate filters, I will remove all usage_type !=ABC123 and all unblended_cost!=0 which is not desired.

Hi @jackattack6800,
Check out this article that explores the ‘AND’ operator. Let us know if you have any additional questions or if you were able to find a work around for your case already.

Thank you!

I am looking to accomplish this in the spice dataset creation step.

I am connecting to an athena table. The filter capabilities are rather generic. I can filter for A AND B AND C. I see no way i the tool to be able to filter where A AND (B AND C). B AND C are required to be true on the given row.

You can create a Athena dataset by using custom SQL. you can refer to this document for details Creating a dataset using Amazon Athena data - Amazon QuickSight

Hi @jackattack6800

You can create a calculated field to apply your filter criteria and return a boolean result.
You can then add a filter on the dataset and filter data as you desire

I create a simple case where I am looking at the Segment and Previous Quarter field values and determine a true/false value. Then I added a filter in the dataset to filter the data when the value = 1

Hi @jackattack6800,
It’s been awhile since we last heard from you, did you have any additional questions regarding your initial post or did one of the solutions provided above help with your case?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!