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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

RANKX Issue

Untitled.png

 

I want to show the rank based on the customer name only.

Here is the formula used

Customer Rank  = RANKX( ALL( Sales[CustomerName]), [Amount],,DESC)
Please help .
4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Would you like to provide some sample data?I need to understand a clearer model.

 

Best Regards,

Eads

 

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

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Anonymous
Not applicable

Please refer image, data is from a single table only.

jdbuchanan71
Super User
Super User

Hello @Anonymous 

Give this a try.

Customer Rank =
CALCULATE (
    RANKX ( ALL ( Sales[CustomerName] ), [Amount],, DESC ),
    ALLSELECTED ( Sales[StateName] )
)
Anonymous
Not applicable

It worked . Still there is an issue brother. Same customer with different state is showing in different rows.

Untitled.png

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors