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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
DarylRob
Helper I
Helper I

Creating a ranking system for specific demographics and metrics

I have a table as below and what I want to do is to be able to create another table with all distinct asset classes and the total revenue and then a ranking based on that total revenue and i've also got a slicer on my page for region that when selected a specific region it would change the totals and rankings based just on that region selected but if no region selected then it would work for all. Hopefully that makes sense, but i'm struggling to get any sort of DAX together to make it work Asset Class Revenue 

 

Asset Class

RevenueRegion
Equity100US
PE100Europe
Equity200Asia
Credit50US
Credit
25US

 

 

This is how i envision the output table to look, this would change once a region is selected as well...

 

Asset Class Total Revenue

Ranking
Equity3001
Credit753
PE1002

 

 

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @DarylRob ,

I created a sample pbix file(see the attachment), please check if that is what you want.

Total Revenue = SUM('Table'[Revenue])
Rank = 
RANKX (
    ALLSELECTED ( 'Table'[Asset Class] ),
    CALCULATE ( [Total Revenue] ),
    ,
    DESC,
    DENSE
)

yingyinr_0-1666598802918.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hi @DarylRob ,

I created a sample pbix file(see the attachment), please check if that is what you want.

Total Revenue = SUM('Table'[Revenue])
Rank = 
RANKX (
    ALLSELECTED ( 'Table'[Asset Class] ),
    CALCULATE ( [Total Revenue] ),
    ,
    DESC,
    DENSE
)

yingyinr_0-1666598802918.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This perfect, thank you so much

johnt75
Super User
Super User

You could create a couple of measures like

Rev = SUM('Table'[Revenue])

Rank = 
var rev = [Rev]
return CALCULATE( 
    RANKX( 'Table', [Rev], rev ),
    ALLSELECTED('Table'[Asset Class] )
)

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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