Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
larcaris
Frequent Visitor

How to change a ranking measure to column

Hello everyone!

I need a help. I did a ranking measure that from of other measure (F_Total), but in fact i need to change this ranking measure to  column, to use it as category in my graph later on.

My ranking measure is: 

Ranking_E = RANKX(ALL('Tabela_Append'[Dim_DePara_Full.GPO Category PBI]), [F_Total], , DESC, Dense)
 
Any help is appreciated, thank you so much!
example_.png
1 ACCEPTED SOLUTION

Resolved with measure!

First, i created a index measure, based on ranking that already works, where i can to set the number of the index that i want to show at waterfall graph.

 
Index =
IF(
[Ranking_] <= 5,
[Ranking_],
if(SELECTEDVALUE(Dimension_[Category])="X",0,
if(SELECTEDVALUE(Dimension_[Category])="Y",7,
if(SELECTEDVALUE(Dimension_[Category])="OTHERS",6))))
 
In the graph, i've added Index measure as a tooltip, and then, order the graph based on my index measure, and it worked perfectly!!!!!!!

View solution in original post

4 REPLIES 4
v-kelly-msft
Community Support
Community Support

Hi @larcaris

 

You need a calculated column as below:

 

Rank = 
RANKX (
    CALCULATETABLE ( DISTINCT ( 'Table'[Category] ), ALLSELECTED ( 'Table' ) ),
    CALCULATE (
        SUM ( 'Table'[F-Sales] ),
        FILTER (
            ALLSELECTED ( 'Table'[F-Sales] ),
            'Table'[Category] = EARLIER ( 'Table'[Category] )
        )
    ),,
    ASC
)

 

 

Then you will see:

161.png

 

For the related .pbix file,pls click here.

 

Best Regards,
Kelly

 

Hello @v-kelly-msft  Kelly!! You are so helpful!.

But i need to open the problem. In my real case, the F-Sales is a measure (that was migrated from excel). My goal is to do a column ranking, and later on a column with TOP5 os these ranking.

 

I will send the pbix file with notations and example of my real case, i would be glad your help or suggestion, because im in the problem for 1 month :((

 

For pbix, click here

 

Thank you so much!

Resolved with measure!

First, i created a index measure, based on ranking that already works, where i can to set the number of the index that i want to show at waterfall graph.

 
Index =
IF(
[Ranking_] <= 5,
[Ranking_],
if(SELECTEDVALUE(Dimension_[Category])="X",0,
if(SELECTEDVALUE(Dimension_[Category])="Y",7,
if(SELECTEDVALUE(Dimension_[Category])="OTHERS",6))))
 
In the graph, i've added Index measure as a tooltip, and then, order the graph based on my index measure, and it worked perfectly!!!!!!!
amitchandak
Super User
Super User

I think You are creating it on the measure, so it needs to be a measure. Why are you not able to use this measure in the graph

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors