Reputation: 67
I have this sample table
City | Store |
---|---|
City1 | STORE1 |
City1 | STORE2 |
City1 | STORE3 |
City2 | STORE4 |
City3 | STORE5 |
City3 | STORE6 |
City3 | STORE7 |
City4 | STORE8 |
I want to show a card that will tell me how many stores are present in the table in a city. For example, if I have a slicer and I pick Store1, the card should read 1 of 3 because it's 1 store of a 3 within the same city.
What's the best way to approach this?
Upvotes: 0
Views: 1115
Reputation: 4346
Can you try the following measure
_count:=
COUNTROWS ( 'Table' ) & " " & "of" & " "
& CALCULATE ( COUNTROWS ( 'Table' ), ALLEXCEPT ( 'Table', 'Table'[city] ) )
Upvotes: 1