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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

RANKX

Hello,

 

I have tried many solutions posted on this forum but with no success :(( I hope someone can help me with this case:

 

I have a data set which looks likes this: 

Dataset Rankx.PNG

 

The clientnr contains unique numbers and the category level 1 and 2 are not unique and contain blank cells. I want to make a ranking based on the number of clients in category level 2 and make a table which looks like this:

Rankx final.PNG

 

I hope someone can post the right dax formula to solve this.

 

Thanks!!

 

Kind regards 

Tiemen

 

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

hi @Anonymous

 

Put in a matrix the columns of your table in this way:

 

step1.png

 

Then create a measure to Rank this:

 

Ranking =
RANKX (
    ALLEXCEPT ( Table1, Table1[category level 1] ),
    CALCULATE ( SUM ( Table1[clientnr] ) ),
    ,
    DESC
)

 

Steo2.png 




Lima - Peru

View solution in original post

2 REPLIES 2
Vvelarde
Community Champion
Community Champion

hi @Anonymous

 

Put in a matrix the columns of your table in this way:

 

step1.png

 

Then create a measure to Rank this:

 

Ranking =
RANKX (
    ALLEXCEPT ( Table1, Table1[category level 1] ),
    CALCULATE ( SUM ( Table1[clientnr] ) ),
    ,
    DESC
)

 

Steo2.png 




Lima - Peru
Anonymous
Not applicable

Thanx @Vvelarde! Your solution works perfect 🙂

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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