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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
I am for some reason having issues with implementing Rank X. For some reason it won't do the simple task of ranking based on a given column or column hiearchy attached with a value.
For example lets say I have a table called Products where it contains the columns: Product, Life Stage, Category, and Value.
The hiearchy goes where Each product has x amount of Life Stages and each Life Stage has x amount of Categories where they all have a value.
I was wondering if it is possible to have a ranking function to where it will rank them based on what row is given. For example, I could have it where it is just the Product column as the row and it ranks like this
Or I can have it where I add in Life stage afterwards and it is ranked like this
Or adding the categories
Or even have it where maybe I only want to know the ranking inbetween Life stages or just inbetween Categories
The solutions I have found online so far hasn't worked for me.
For example writing
Solved! Go to Solution.
Hi @Anonymous ,
According to your statement, your rank is calcualted base on specific columns in your visual. As far as I know, currently Power BI doesn't support us to create a rank measure dynamiclly to show results as you want.
I suggest you to try create different rank measures based on different situation.
Rank for Product = RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Product]),[M_Value])
Rank for Lifestafe = RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Lifestage]),[M_Value])
Rank for Category = RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Category]),[M_Value])
Rank for P & L = RANKX(FILTER(SUMMARIZE(ALLSELECTED('Table'),'Table'[Product],'Table'[Lifestage]),'Table'[Lifestage] = MAX('Table'[Lifestage])),[M_Value])
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your statement, your rank is calcualted base on specific columns in your visual. As far as I know, currently Power BI doesn't support us to create a rank measure dynamiclly to show results as you want.
I suggest you to try create different rank measures based on different situation.
Rank for Product = RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Product]),[M_Value])
Rank for Lifestafe = RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Lifestage]),[M_Value])
Rank for Category = RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Category]),[M_Value])
Rank for P & L = RANKX(FILTER(SUMMARIZE(ALLSELECTED('Table'),'Table'[Product],'Table'[Lifestage]),'Table'[Lifestage] = MAX('Table'[Lifestage])),[M_Value])
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Rico,
While I do find it unfortunate that that is the case, I appreciate you providing the workaround it.
I guess I thought PowerBi would have those capabilities, but there is still room for it to grow.
Thank you.