Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
| CustomerNumber | CustomerName | Sales$ | Rank |
| 16290 | A | 430234 | 1 |
| 3874 | B | 428866 | 1 |
| 16364 | C | 364207 | 1 |
| 14920 | D | 364207 | 1 |
I am expecting something like below.
| CustomerNumber | CustomerName | Sales$ | Rank |
| 16290 | A | 430234 | 1 |
| 3874 | B | 428866 | 2 |
| 16364 | C | 364207 | 3 |
| 14920 | D | 364207 | 4 |
I used this :
Solved! Go to Solution.
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.
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.
@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.
In your fromual what is [EachesCost] ?
Sorry for the inclmplete data..
DC-R Ace is the table,
[Eachescost] is the Sales$ column.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 192 | |
| 125 | |
| 99 | |
| 67 | |
| 48 |