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
RogerSteinberg
Post Patron
Post Patron

Ranking game sales by month

Hi,

 

I was able to rank sales by various dimensions on a daily basis but wasn't able to incorporate the monthly ranking into my measure:

RANKX( 
    ALLSELECTED( 'Table'), // Need to keep allselected so that ranking applies to other attributes
    [Revenue Sales], // Measure
    , DESC, Dense 
    )
    
5 REPLIES 5
v-lionel-msft
Community Support
Community Support

Hi @RogerSteinberg ,

 

Please give a copy of the sample data and the formula for the measure [Revenue Sales].

 

Best regards,
Lionel Chen

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

Tahreem24
Super User
Super User

Try the measure:

RankColumn = RANKX(FILTER(Table,Table[Month]=EARLIER(Table[Month])),RevenueMeasure,,DESC, Dense)

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

By doing so , you remove the allselected logic which is crucial when I need to rank  games by sales . I also have slicers .

Use this:

RankColumn = RANKX(FILTER(ALLSELECTED(Table),Table[Month]=EARLIER(Table[Month])),RevenueMeasure,,DESC, Dense)

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

it gives me the same value. its not working

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.