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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!