Trying to create a PowerBI report - I have a table below and want to filter on which stores do not have Pears. It's very straightforward to create a report view and drill through which stores have specific fruit, but I can't figure out the opposite.
Store | Fruit |
---|---|
store1 | Apples |
store1 | Bananas |
store1 | Pears |
store2 | Apples |
store2 | Bananas |
store3 | Apples |
store3 | Bananas |
It's not clear what your desired output is. But if you are only interested in the inadequate stores, use this DAX table measure:
No Pears Stores =
EXCEPT (
CALCULATETABLE (
VALUES ( 'Table'[Store] )
),
CALCULATETABLE (
VALUES ( 'Table'[Store] ),
'Table'[Fruit] = "Pears"
)
)