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.
My x-axis in the chart is going in a random order. I imagine this is due to it being stored as text and because of the hyphen, is there a way around this issue, so that it does 17-2017, 18-2018, 19-2019, 20-2020, 20-2021, 21-2021?
Thanks!
Solved! Go to Solution.
@Anonymous
Refer to this document..
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
You have to create an index column and use that as SORT BY column to your category.
There are tons of post in the forum for SORT BY..
If it helps mark it as a solution
Kudos are nice too
hi @Anonymous
For your case, you could just add Year-weeknum column that format is 2017-17,2018-18,2019-19,2020-20,2021-20, 2021-21.
Then selected weeknum-year column(17-2017, 18-2018, 19-2019, 20-2020, 20-2021, 21-2021), set sort by column with Year-weeknum column.
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
https://radacad.com/sort-by-column-in-power-bi
Regards,
Lin
You can add a new column to give you the desired sort order. This new column will be a number, not a text.
Creating the sort column in the Query Editor, you can use this formula:
( Number.From( Text.Start([Text Column], 2) ) * 10000 ) + Number.From( Text.End([Text Column],4) )
Where [Text Column] is the name of your existing column.
After loading the data to your model, sort your original column by this new, numerical column. There is a button in the ribbon called "sort by column"
@Anonymous
Refer to this document..
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
You have to create an index column and use that as SORT BY column to your category.
There are tons of post in the forum for SORT BY..
If it helps mark it as a solution
Kudos are nice too
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 |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |