Forum Discussion
parry2k
8 years agoSuper User
count by measure
hi there,
I have a calculated measure to calculate the share % of each category, based on category share there is ranking, if % > 20 then A if % > 10 then B else C
I added the measure for ranking as well, so in table category, % and rank all looks good.
I want to count number of categories under each rank. What is the best way to achieve it?
thanks,
P
8 Replies
- parry2kSuper User
Just to add more there will be slicer on category so the solution should work if any value is selected in a slicer.
- Zubair_MuhammadCommunity Champion
HI parry2k
Try this approach
Create a calculated table of all available RANKS (a,b,c,d etc)
RANKs = DATATABLE("RANK",STRING,{{"A"},{"B"}})Then you can use this MEASURE to count categories against each RANK
Measure = COUNTX ( FILTER ( ALLSELECTED ( Table1[Category] ), [RANK] = SELECTEDVALUE ( RANKs[RANK] ) ), 1 )- Zubair_MuhammadCommunity Champion