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.
Hello, Is it possible to sort the X axis by two dimensions? In my case I would like to sort the X axis by duration ( as shown ) then by day ( to estimate trend ). If the source data is sorted in this way, it does not translate to the report object. The legend is sorted correctly but not the X axis. Thank you for your help and time.
Solved! Go to Solution.
I've got your question: you want to sort the stacked bar chart by duration then by day.
However, the Stacked bar chart still does not support multi-dimensional sorting now, it is not possible to use both sorting methods at the same time
Maybe you can try this custom sorting:
First, I created a set of sample data:
Then I copied the day column, clicked Enter Data to paste it in, and created a new column to use as a sort marker:
Click Transform data > Merge Queries
Apply & Close
Column tools > (select the day column) Sort by column > Table (3).sort
The result is as follow:
Or you can try R script and create your own stacked bar chart with both sorting methods, these documents may help you:
Run R scripts in Power BI Desktop - Power BI | Microsoft Learn
Create Power BI visuals using R - Power BI | Microsoft Learn
Learn which R packages are supported - Power BI | Microsoft Learn
Best Regards,
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I've got your question: you want to sort the stacked bar chart by duration then by day.
However, the Stacked bar chart still does not support multi-dimensional sorting now, it is not possible to use both sorting methods at the same time
Maybe you can try this custom sorting:
First, I created a set of sample data:
Then I copied the day column, clicked Enter Data to paste it in, and created a new column to use as a sort marker:
Click Transform data > Merge Queries
Apply & Close
Column tools > (select the day column) Sort by column > Table (3).sort
The result is as follow:
Or you can try R script and create your own stacked bar chart with both sorting methods, these documents may help you:
Run R scripts in Power BI Desktop - Power BI | Microsoft Learn
Create Power BI visuals using R - Power BI | Microsoft Learn
Learn which R packages are supported - Power BI | Microsoft Learn
Best Regards,
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please graphically indicate the expected outcome.
Hello Ibendlin, Thank you for the response. Please see the image attached. Hopefully this helps.
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 |
---|---|
96 | |
93 | |
82 | |
70 | |
64 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |