Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

RANKX drill down matrix not working

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;

 

k3rqda6smqh51.png

 
 

 

 

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 ) )

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@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 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

3 REPLIES 3
Fowmy
Super User
Super User

@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 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

@Fowmy thank you so much, have been struggling with this for so long

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.