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 ra...
parry2k
8 years agoSuper 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_Muhammad
8 years agoCommunity 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_Muhammad8 years agoCommunity Champion
- parry2k8 years agoSuper User
I was doing the same but here are few changes which I made and it is not working:
- No sum on amount in table to calculate %
- % is calculated based on allselected
- small change in rank formula to get 3 values
- made changes to "measure" to allselected instead of allselected(Table1[Category])
now if you select multiple values in slicer, you don't get correct result. Take a look, I made the changes in attached.
Thanks,
P
-
- parry2k8 years agoSuper User