Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all ,
I have a measure ranking teams per year which I can put in a line graph - however it shows 1st as bottom and 20th as top. I want it the other way round. Is there a way to swop this round, cant find it.
I did consider taking the position away from the number of teams in the league (+1) so 1 out of 20 becomes 20 - 1 = 19 + 1 = 20
and 20 becomes 20 - 20 = 0 becomes 20+1
So 1st woud show at the top. But I still need to get the position shown somehow on the graph?
Any ideas.
Thanks for your tips and time reading!
Solved! Go to Solution.
@Anonymous
Here is the simple process to "reverse" the y-axis in a Line chart:
1) create your [rank measure]
2) create a new measure which is simply multiplying your [rank measure] * -1
3) go into the modeling pane and select the new [rank measure] * -1. In the properties pane, select "Custom format" and format the output so that the expression for negative values is the same as positive values.
And you can now use this measure in the Line Chart visual to display the rank values as you would expect (including axis and point labels)
Hope this helps!
EDIT: The actual blog article is now online if you are interested in the "long-winded" explanation!
"Reversing" the Y-axis in a Line Chart visual
Proud to be a Super User!
Paul on Linkedin.
@Anonymous
There is actually a (relatively simple ) way of doing this. I'm currently writing up a blog post to show the "how to...". If you can hang on for a couple days it will be (hopefully) published. If not, I can showcase the method for you here of course...(I just need to put the relevant images together to help with the explanation).
Proud to be a Super User!
Paul on Linkedin.
Thanks , yep sure let me know when you blog about it. It seems like it should be easy - but I'm not spotting the trick to it! Thankyou
@Anonymous
Here is the simple process to "reverse" the y-axis in a Line chart:
1) create your [rank measure]
2) create a new measure which is simply multiplying your [rank measure] * -1
3) go into the modeling pane and select the new [rank measure] * -1. In the properties pane, select "Custom format" and format the output so that the expression for negative values is the same as positive values.
And you can now use this measure in the Line Chart visual to display the rank values as you would expect (including axis and point labels)
Hope this helps!
EDIT: The actual blog article is now online if you are interested in the "long-winded" explanation!
"Reversing" the Y-axis in a Line Chart visual
Proud to be a Super User!
Paul on Linkedin.
@PaulDBrown thankyou very much! Perfect. I would never have worked it out myself.
@Anonymous
I've submitted it for approval, but will post the method here if the blog post isn't made public tomorrow (no point in waiting). Can't do it right now since I've logged off my pc for the day (it's 22:40 here...)
Proud to be a Super User!
Paul on Linkedin.
Hi @Anonymous ,
It's impossible to achieve the idea in current version, because the 'End value' of Y axis must be greater than the 'Start value' of Y axis.
Please submit your idea .
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks yes. Surely it something thats been done though graph a top ranking at the top of a visual and have it display as 1?
Thanks for your time though. Much appreciated.
@Anonymous , Not very clear. In rank you have option asc and desc. You can use that ?
example
Rank Discount % (Brand) = RANKX(all('Item'[Brand]),[Discount %],,DESC,Dense)
Rank Discount % (Brand) = RANKX(all('Item'[Brand]),[Discount %],,asc,Dense)
Thanks that somewhat helps - in that I will rank my top perfoming team by points , so they will appear at the top of the line chart. ie best point will be rank 20 of 20 worst ranked 1 out of 20.
I still need to have data labels though and axis details if possible. Like the image below best perfoming is at the top, but i need labels too to show if possible. Thanks
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |