Forum Discussion
Sorting Axis for Vizusalisations
- Anonymous2 years ago
Hi, fakeeh
As you mentioned, I've created a simple sample:
The default sorting is as follows:
Here's how to reorder the rating column by another column:
First, I created a calculated column using the following DAX expression, with the values representing the order in the x-axis.
Sort column = SWITCH('Table'[Rating], "Excellent",1, "Poor",3, "Good",2)To avoid circular dependency issues, I copied the Ratin column and named it Rating column:
Then use the Sort column to sort the Rating column column, as shown in the following figure:
Use the Rating column column as the x-axis in the column chart visual:
At this point, the ordering of the x-axis has changed. When I change the numbers in the Sort column, the order of the x-axis changes dynamically:
I provide the PBIX file used this time below.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, fakeeh
As you mentioned, I've created a simple sample:
The default sorting is as follows:
Here's how to reorder the rating column by another column:
First, I created a calculated column using the following DAX expression, with the values representing the order in the x-axis.
Sort column = SWITCH('Table'[Rating],
"Excellent",1,
"Poor",3,
"Good",2)
To avoid circular dependency issues, I copied the Ratin column and named it Rating column:
Then use the Sort column to sort the Rating column column, as shown in the following figure:
Use the Rating column column as the x-axis in the column chart visual:
At this point, the ordering of the x-axis has changed. When I change the numbers in the Sort column, the order of the x-axis changes dynamically:
I provide the PBIX file used this time below.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.