Aggregations on LACs with Quicksight Calculated Fields

I have a table with order information. It is broken down by OrderID, Item Name. How can I get the count of all orders with multiple x and y items. For example, how many orders have more than 1 dumplings and more than 1 water?

@Skodati8 Lets try this. Add a calc like:

sumOver(ifelse({item}='dumplings', 1, 0), [idcliente], PRE_AGG) >=2

AND

sumOver(ifelse({item}='water', 1, 0), [idcliente], PRE_AGG) >=2

This will result in a boolean (1=TRUE, 0=FALSE). Then you would put a filter on that field (choose 'no aggregation) and set equal to one. Then build whatever visual you want (distinct count of order ID KPI or something).

1 Like

I adjusted it to have the locate function and then did a disntinct_countif on the data. That worked. Thank You!

1 Like