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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

RankX return many 1s

Hello all,

 

Iam trying to rank the customerNumber based on the sales. Top sales as 1 and next as 2 and so on .. But I get lot of rank values as 1. 

 

This is how I am getting.

CustomerNumberCustomerNameSales$Rank
16290A4302341
3874B428866
16364C3642071
14920D3642071

 

I am expecting something like below.

CustomerNumberCustomerNameSales$Rank
16290A4302341
3874B4288662
16364C3642073
14920D364207

4

 

I used this : 

Rank = RANKX(ALL('DC-R Ace'[CustomerNumber]),CALCULATE(SUM('DC-R Ace'[EachesCost])),,DESC)
 
Where am I doing wrong. Please help.
 
Thanks
1 ACCEPTED SOLUTION
AnkitBI
Solution Sage
Solution Sage

For your case, Use below

 

Rank = RANKX(ALL('DC-R Ace'[CustomerNumber],'DC-R Ace'[CustomerName]),CALCULATE(SUM('DC-R Ace'[Sales$])),,DESC)

Thanks
Ankit Jain

Do Mark it as solution if the response resolved your problem. Do like the response if it seems good and helpful.

View solution in original post

4 REPLIES 4
AnkitBI
Solution Sage
Solution Sage

For your case, Use below

 

Rank = RANKX(ALL('DC-R Ace'[CustomerNumber],'DC-R Ace'[CustomerName]),CALCULATE(SUM('DC-R Ace'[Sales$])),,DESC)

Thanks
Ankit Jain

Do Mark it as solution if the response resolved your problem. Do like the response if it seems good and helpful.

Anonymous
Not applicable

@AnkitBI  Thanks a ton for the help.
I ve realized that We are supposed to add all the columns to the DAX formula that we are adding on to the visual. 

AnkitBI
Solution Sage
Solution Sage

In your fromual what is [EachesCost] ?

Anonymous
Not applicable

Sorry for the inclmplete data..
DC-R Ace is the table,
[Eachescost] is the Sales$ column.

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.