Forum Discussion
Anonymous
9 years agoNot applicable
Count orders that does not include x (Filter granularity)
Hi, I have a sales tables, with 1 line for every item in an order. My goal is to count the amount of orders that has a revenue below 319,2 and were the order does not include an item from the...
Anonymous
9 years agoNot applicable
Made a workaround by creating two different measures, and then calculating the difference between the two, to get my desired result, but surely there must be another way?
Orders below 319,2 = CALCULATE( COUNTROWS(VALUES(Sales[OrderID.])); FILTER(VALUES(Sales[OrderID]);Sale[Sales Revenue] < 319,2) )
Orders below 319,2 that includes FOOD:
Orders below 319,2 incl. FOOD = CALCULATE( COUNTROWS(VALUES(Sales[OrderID])); FILTER(VALUES(Sales[OrderID]);Sales[Sales Revenue] < 319,2); FILTER(Product;Product[MainGroup] = "FOOD") )
Orders that doesn't include food:
Orders below 319, ex FOOD = [Orders below 319,2] - [Orders below 319,2 incl. FOOD]