Forum Discussion
Anonymous
6 years agoNot applicable
Rankx on a matrix
i am trying to do rankx on a matrix table but when i drill down i would like the rankx to recalculate when i drill down, currently i have the following fields in my matrix and want to do the rank by ...
Anonymous
6 years agoNot applicable
Hi Anonymous ,
Since it is matrix and you need to drill down, you will need to use ISINSCOPE.
See this article
https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/
Regards,
Harsh Nathani
Anonymous
6 years agoNot applicable
Anonymous i have tried doing ISINSCOPE and dont get any different result it is still just giving me a 1 for everything when i drill down;
Endleaf Rank =
SWITCH(
TRUE(),
ISINSCOPE(Sales[Username]), RANKX(ALLSELECTED(Sales[Username]),[Total Points], ,DESC,Dense),
ISINSCOPE(Sales[Date].[Month]),RANKX(ALLSELECTED(Saless[Date].[Month]), [Total Points], ,DESC, Dense),
ISINSCOPE(Sales[store]]]), RANKX(ALLSELECTED(Store[store]),
[TotalSales], ,
DESC,
Dense)
)