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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello guys,
I have a simple bar chart - it slices the data by a numeric variable on Y- axis , categorical on X- axis and period (year) further slices under the legend
I need to sort the chart by the value of the most recent year, from 1 to 2 per picture below
I could not figure out how to do that using the bar chart, and ended up setting up measures where the most current year in the data (Max[CurrentYEar]) is Current Year, the Prior Year = Current Year -1 etc. Now I can sort the visual by Current Year value, but my problem is that i don't know if it's possible to dynamicaly label the years. Right now I am picking up measures CY, CY-1, etc. and manually use "rename for this visual" feature to change the years. This is a published report that pulls from a database, if I don't catch the day the new year data becames availalble, the users are misguided.
Would you know if there is a way to achieve what I am looking for - to sort by the value of the most recent year, and have dynamic lableing so I don't have to worry about renaming through "rename for this visual"?
Thank you!
Hi,
I am not sure how much i can help but i would like to try. Share the download link of the PBI file
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |