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
What am i missing?
Thanks
Solved! Go to Solution.
Hi @Walter7432 ,
According to your description, here's my solution.
Create a calculated column.
Ranking column =
RANKX (
FILTER ( ALL ( query ), 'query'[EAN Code] = EARLIER ( query[EAN Code] ) ),
query[Price],
,
ASC
)
Or create a measure.
Ranking Measure =
RANKX (
FILTER ( ALL ( query ), 'query'[EAN Code] = MAX ( query[EAN Code] ) ),
CALCULATE ( SUM ( query[Price] ) ),
,
ASC
)
Get the correct result.
I attach the sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Walter7432 ,
According to your description, here's my solution.
Create a calculated column.
Ranking column =
RANKX (
FILTER ( ALL ( query ), 'query'[EAN Code] = EARLIER ( query[EAN Code] ) ),
query[Price],
,
ASC
)
Or create a measure.
Ranking Measure =
RANKX (
FILTER ( ALL ( query ), 'query'[EAN Code] = MAX ( query[EAN Code] ) ),
CALCULATE ( SUM ( query[Price] ) ),
,
ASC
)
Get the correct result.
I attach the sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Use SUM(query[price]) instead of query[price]
Proud to be a Super User!
Paul on Linkedin.
Thanks for the reply. I made the changes to both typs column and measure:
Oh I see...for the measure, try
Rank EAN =
VAR _sum =
SUM ( query[price] )
RETURN
RANKX ( ALLSELECTED ( query[EAN Code] ), _sum )
Proud to be a Super User!
Paul on Linkedin.
Formula works, but Rank is now same for all. 🙄
Data View
Visual
That's because you included another column in the visual.
Rank EAN =
VAR _sum =
SUM ( query[price] )
RETURN
RANKX ( ALL ( query[EAN Code] , query[Name] ), _sum )
Proud to be a Super User!
Paul on Linkedin.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 118 | |
| 98 | |
| 70 | |
| 69 | |
| 65 |