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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi, i'm having some trouble using HANKX, i'm trying to rank a table based on a column, This column is a sum between as points and RAND()*0.01, so i don't have any repeated value.
this is the formula im using:
ranking = RANKX(fto_resultados,fto_resultados[Pont+rand])
When i insert this measure in a table, it just return the the number one and repeat for every line.
Also tried using ALL an ALLSELECTED but did't worked as well
Solved! Go to Solution.
Hi Lucas:
Here are two measures that can work for one column and second one considering two columns from the same table: I will picture the table below. One or both of these should work. My table named used is 'TableRank'. I hope this provides your solution!
Hi:
Can you try using a pattern such as: (Here is an example for ranking customers by net sales). Where Sales_Data is the Fact Table and Customers is Dimension table and Customers[Serach Name] is being ranked for net sales. I can't see your other tables,so I hope this helps!
Rank_Cust by Region =
IF([Net Sales] > 0,
RANKX(
CALCULATETABLE(
SUMMARIZE(Sales_Data,
Customers[Search Name]),
ALL(Customers[Search Name])
),
[Net Sales],
,
DESC
))
I tried to do something like you did, but i stil getting the same result, in my case, both columns that i whant to analize are in the same table, is it supose to work difrently?
Hi Lucas:
Here are two measures that can work for one column and second one considering two columns from the same table: I will picture the table below. One or both of these should work. My table named used is 'TableRank'. I hope this provides your solution!