PowerBI , change order in one column in stacked chart

限于喜欢 提交于 2021-02-11 14:14:05

问题


I am creating a Power BI report in Stacked column chart. Can I change the order in a column, just like show in the picture?

Hope some masters can help me to solve the problem!

enter image description here


回答1:


One way to achieve this is to define a custom column with values that will give you the desired sorting order, and then use Sort by column.

Open Power Query Editor by clicking on Edit Queries button, and in Add Column tab click on Custom Column. To reverse the sort order, you can subtract Level from some bigger number, e.g. a million, so enter this formula:

Custom Sort Order = 1000000 - [Level]

Like this:

Close Power Query Editor and apply the changes, then select your stacked column chart visual and in Fields pane click on the Level column. In Modeling tab, click on Sort by Column button and from the dropdown select the newly defined custom column:

This will sort the segments in reverse order.



来源:https://stackoverflow.com/questions/60405872/powerbi-change-order-in-one-column-in-stacked-chart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!