March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi, i am trying to create a rankx that recalculates when you drill down in a matrix table i have tried about 100 different ways currently my table looks like this;
the top level works in regards to ranking but when i drill down it just shows ones the dax measure i am using is the following;
Endleaf Rank = SWITCH ( TRUE (), ISINSCOPE ( Sales[Sales Executive] ), RANKX ( ALLSELECTED ( Sales[Sales Executive] ), [Total Points], , DESC, DENSE ), ISINSCOPE ( Sales[Month] ), RANKX ( ALLSELECTED ( Sales[Month] ), [Total Points], , DESC, DENSE ), ISINSCOPE ( Sales[Store] ), RANKX ( ALLSELECTED ( Sales[Store] ), [Total Points], , DESC, DENSE ), ISINSCOPE (Sales[Product] ), RANKX ( ALLSELECTED ( Sales[Product] ), [Total Points], , DESC, DENSE ) )
Solved! Go to Solution.
@Anonymous
Your measure is correct but the order in which you ordered the columns needs to change from lower to upper, try this measure, please.
Endleaf Rank =
SWITCH (
TRUE (),
ISINSCOPE ( Sales[Product] ), RANKX ( ALLSELECTED ( Sales[Product] ), [Total Points],, DESC, DENSE ),
ISINSCOPE ( Sales[Store] ), RANKX ( ALLSELECTED ( Sales[Store] ), [Total Points],, DESC, DENSE ),
ISINSCOPE ( Sales[Month] ), RANKX ( ALLSELECTED ( Sales[Month] ), [Total Points],, DESC, DENSE ),
ISINSCOPE ( Sales[Sales Executive] ), RANKX ( ALLSELECTED ( Sales[Sales Executive] ), [Total Points],, DESC, DENSE )
)
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous
Your measure is correct but the order in which you ordered the columns needs to change from lower to upper, try this measure, please.
Endleaf Rank =
SWITCH (
TRUE (),
ISINSCOPE ( Sales[Product] ), RANKX ( ALLSELECTED ( Sales[Product] ), [Total Points],, DESC, DENSE ),
ISINSCOPE ( Sales[Store] ), RANKX ( ALLSELECTED ( Sales[Store] ), [Total Points],, DESC, DENSE ),
ISINSCOPE ( Sales[Month] ), RANKX ( ALLSELECTED ( Sales[Month] ), [Total Points],, DESC, DENSE ),
ISINSCOPE ( Sales[Sales Executive] ), RANKX ( ALLSELECTED ( Sales[Sales Executive] ), [Total Points],, DESC, DENSE )
)
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous , once you drill you need categorical rank or subcategory rank, refer those in the bold link
so refer
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
93 | |
90 | |
86 | |
76 | |
49 |
User | Count |
---|---|
166 | |
149 | |
99 | |
73 | |
57 |