Forum Discussion
Showing Top 3 Counts in Matrix Table
I got closer by using Body Grouping as Filter and using Top 3 by Total Count. Now I need a measure to use as a filter to show only the the Top 3 Body Grouping.
- bdehning2 years ago
Post Prodigy
I am still stuck on this on trying trying not to show columns of Cause that are not included in the Top 3 per Body Grouping. In this case, I should not see Animal, Burn, Scald, , Exposure, Strike, Step on and Struckby
- Anonymous2 years agoNot applicable
Hi bdehning ,
After my testing, it is unlikely that you want to act on the measure in the filter to achieve your needs, I would suggest the following approach:
Create these measures:Count_Cause = COUNT('Table'[Cause Grouping])_RANK = RANKX(ALLEXCEPT('Table', 'Table'[Body Grouping]), [Count_Cause], , DESC, Skip)Output = IF( [_RANK] <= 3, [Count_Cause], BLANK() )Then put the measure Output into the Value of the Matrix:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- bdehning2 years ago
Post Prodigy
I am not getting what you got so far. I am getting this so far. I will try again b ut providing my model info below.
My Body Grouping is in Table BodyPart
My Cause Grouping is in Table Injury CauseBodyPart and Injury Cause are both joined to LossRun Table.
My Count_Cause =COUNT('InjuryCause'[Cause Grouping])
My _RANK =RANKX(ALLEXCEPT('BodyPart', 'BodyPart'[Body Grouping]), [Count_Cause], , DESC, Skip)
My Output =IF([_RANK] <= 3,[Count_Cause],BLANK())
I do have _Rank has a Filter and is less than or equal to 3.
Something is a miss on my end.