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