Forum Discussion
Ranking in Matrix Visual and Datewise
- Anonymous4 years ago
HI Anonymous,
I think you need to add if statement to check the current hierarchy level and write different rank formulas for the different level ranking:
Clever Hierarchy Handling in DAX - SQLBI
DAX – Ranking with Hierarchy Drill-Down – Azure Data Ninjago & dqops
Regards,
Xiaoxin Sheng
Anonymous , change the region if like
IF(
ISINSCOPE(Orders[Region]),
VAR CustomerRanking = [Total Sales]
RETURN
CALCULATE(
RANKX(
ALLSELECTED(Orders[Region]),
[Total Sales], ,
,DESC,dense
)
)
)
This means each region will get rank for each date
Hi Amit,
Thanks for the revert.
Your DAX is giving me correct result at Region Level.
But When i expand to State or Province it is giving me Rank 1 for all the dates.
It has to give me Raning for State or Province within that Region.
- Anonymous4 years agoNot applicable
HI Anonymous,
I think you need to add if statement to check the current hierarchy level and write different rank formulas for the different level ranking:
Clever Hierarchy Handling in DAX - SQLBI
DAX – Ranking with Hierarchy Drill-Down – Azure Data Ninjago & dqops
Regards,
Xiaoxin Sheng