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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
raymond
Post Patron
Post Patron

Switch Axis: 10 turns into a 1

Hey Guys,

 

simple case. I have a ranking. The higher the number, the better. Suppose I 

Value 1 = 7 >> should turn into the number 1

Value 2 = 5 >> should turn into the number 3

 

Another issue is, the numbers can be decimals. The max is unknown, hence the 7 can be a 10 as well. The numbers must be used as a y axis in a line chart. 

 

I am not sure if this can be solved via measure, perhaps with a column? 

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @raymond 

 

I’m not quite sure about the requirements, figure that you’d like to generate the rank, the higher of the value, the better ranking.

And then use the ranking as Y-axis, the values as the X-axis.

 

Thus I created the sample with columns [Values] and add the measure:

Rank = RANKX(ALL(Table1),CALCULATE(MAX(Table1[Values])))

Result shown as below:

04.png

Best regards,

Dina Ye

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hi @raymond ,

 

If my above post helps, could you please consider Accept it as the solution to help the other members find it more quickly. thanks!

 

Best regards,

Dina Ye

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
v-diye-msft
Community Support
Community Support

Hi @raymond 

 

I’m not quite sure about the requirements, figure that you’d like to generate the rank, the higher of the value, the better ranking.

And then use the ranking as Y-axis, the values as the X-axis.

 

Thus I created the sample with columns [Values] and add the measure:

Rank = RANKX(ALL(Table1),CALCULATE(MAX(Table1[Values])))

Result shown as below:

04.png

Best regards,

Dina Ye

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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