Reputation: 5155
How can I filter where State = AA
, group by Store
and count the number of unique values in Item
in Power BI?
YearMonth State Store Qty Sales Item
0 2020-06 AA JW442 1.0 100 SP006
1 2020-06 AA JW442 1.0 1200 SP007
2 2019-09 CC JW600 4.0 700 SP020
3 2019-05 AA JW100 5.0 30 SP00
4 2019-05 AA JW100 4.0 8500 SP5
...
Upvotes: 0
Views: 1709
Reputation: 3741
Try this measure:
Measure = CALCULATE( COUNTROWS(values(tabx[Item])), filter(ALL('tabx'[State]), 'tabx'[State] = "AA"))
Upvotes: 1