Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello! I am looking to reorder the categories within the columns of a combo chart. I would like the visual below:
to look more like the visual below here:
Where all the grey categories are at the bottom in the same order. I don't really care about the ordering of the coloured categories. Is this possibe to rearrange the categories in such a way? In my top visual the location of the grey block changes in June/July is because they are actually different categories to the previous months, I just have the same colour assigned to them.
My set-up is as follows:
Thank you for any help!
Solved! Go to Solution.
Hi , @Anonymous
Instead of entering a table, you can use dax to create a a dynamic sort table:
Order 1 = DISTINCT(Table1[Country])
Create a custom rand sort order :
rand sort column = RAND()
Then select the field ("Country") and make it sort by cloumn " rand sort order.
In addition,you also can take a try to create a calculate column "Ranking" ( Here I rank the countries by total of COGS)
Ranking = RANKX('Table1',SUMX(FILTER('Table1','Table1'[Country]=EARLIER(Table1[Country])),'Table1'[COGS]),,DESC,Dense)
Then you can use formala to create a sort table:
Order 2 = SUMMARIZE(Table1,Table1[Country],Table1[Ranking])
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
It is suggest to create a seperate table with a index column and establish a relationship between seperate table and the original table:
Then select the field ("Country") and make it sort by cloumn "index"
The result of the comparison is as follows:
Best Regards,
Community Support Team _ Eason
Hi @v-easonf-msft thank you for your reply. However, in my case the categories could change over time. So creating such a table would be difficult to account for new categories being entered?
Hi , @Anonymous
Instead of entering a table, you can use dax to create a a dynamic sort table:
Order 1 = DISTINCT(Table1[Country])
Create a custom rand sort order :
rand sort column = RAND()
Then select the field ("Country") and make it sort by cloumn " rand sort order.
In addition,you also can take a try to create a calculate column "Ranking" ( Here I rank the countries by total of COGS)
Ranking = RANKX('Table1',SUMX(FILTER('Table1','Table1'[Country]=EARLIER(Table1[Country])),'Table1'[COGS]),,DESC,Dense)
Then you can use formala to create a sort table:
Order 2 = SUMMARIZE(Table1,Table1[Country],Table1[Ranking])
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
refer if this can help
https://www.seerinteractive.com/blog/reorder-powerbi-legend/
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |