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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.