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 there,
I have a table with Store ID, Store Name and Sales.
I have created a measure to Rank the Store Names based on highest sales.
StoreRank = RANKX(ALLSELECTED(
'Table'[Store Name]),
CALCULATE(SUM('Table'[Sales])),,DESC)
When I use the Rank alone with Store Name it works, but the moment I add store ID in the table it returns all ranks to - 1
Can anyone help me solve this issue, please.
Solved! Go to Solution.
Why do you use ALLSELECTED instead of ALL???
Why do you use 'Table'[Store Name] instead of just 'Table'???
so try this
StoreRank = RANKX ( ALL ( Table ), CALCULATE ( SUM ( 'Table'[Sales] ) ),, DESC )
In that case the ranks returned are all 1 for all the stores
Not in my test data. See pic below
Actually I have a larger database, but I cut it short to ask the question.
Is it possible to send it to you to check what I am doing wrong ?
Yes, my email is sokg@yahoo.com. You can send me your .pbix file.
Please check your privacy of your data. I assume you are allowed to do that.
I have sent you the file in your email
Hi, Have you been able to check my file.
I have not receive it.
Please send it again
sokg@yahoo.com
Please check, I sent again now.
Did you ever get a response? I have the same issue.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |