Forum Discussion
Simple TOPN
- 7 years ago
FilteredTable = TOPN( 5, complaints, complaints[cases], DESC )
- 7 years ago
Hi johnmelbourne
You can use Rank as a measure like below.Rank Cases by Tier2= RANKX( CALCULATETABLE( VALUES( complaints[Tier2] ), ALLSELECTED() ), CALCULATE( SUM( complaints[Cases] ) ),, DESC )Or Column
Rank Cases by Tier2 = RANKX( VALUES( complaints[Tier2] ), CALCULATE( SUM( complaints[Cases] ) ),,, Dense )Regards,
Mariusz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi johnmelbourne
You can use Rank as a measure like below.
Rank Cases by Tier2=
RANKX(
CALCULATETABLE(
VALUES( complaints[Tier2] ),
ALLSELECTED()
),
CALCULATE(
SUM( complaints[Cases] )
),,
DESC
)Or Column
Rank Cases by Tier2 =
RANKX(
VALUES( complaints[Tier2] ),
CALCULATE( SUM( complaints[Cases] ) ),,,
Dense
)Regards,
Mariusz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you Mariusz for the additional procedure. Love to learn. Your solutions were perfect. My TOPN approach kept on throwing an error saying multiple columns. Then you provioded your solution and I also read this article which explained why TOPN is useless by itself. https://www.dutchdatadude.com/power-bi-pro-tip-confusion-about-topn-versus-rankx/
Your contribution was perfect. Thanks Mariusz