Custom sorting in PowerBI chart

£可爱£侵袭症+ 提交于 2019-12-21 04:26:15

问题


Recently I came across one issue in which I need to show the column order as per my defined way in PowerBi report. Thing is, PowerBI sorts the columns in either Ascending(A->Z) or descending(Z->A) order, then if one has to apply his custom order how he should achieve this?

Here is and example

Here we can see the order on X-Axis is ascending or we can show it descending, but what if i would like to sort the order with respect to my need; may be as below :

1.2 Wheel Preview --> 1.2 GTR --> 1.2 Ultra --> 1.2 RTR

, Would it be possible in PowerBI desktop while creating the report, if yes, then guidelines to be followed will be well appreciated. :)

Thanks.


回答1:


Add a column to your source data and populate it with values for the desired sort order. Then select the column you want to custom sort and click Modeling > Sort by Column. Select the new column as the SortBy column for the existing column, like in the screenshot: The SortCategory column is used as the sort order for the Category column.

Now create a chart and the categories on the axis will be sorted according to the values of the SortCategory column.




回答2:


We can able to sort column one depends on another column

My input table

Sorting option config: Select column which you want to sort and select sort button, select based on which column we need to sort

After sorting the table



来源:https://stackoverflow.com/questions/38185629/custom-sorting-in-powerbi-chart

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