PowerBI 图表中的自定义排序 [英] Custom sorting in PowerBI chart

查看:23
本文介绍了PowerBI 图表中的自定义排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我遇到了一个问题,我需要按照我在 PowerBi 报告中定义的方式显示列顺序.问题是,PowerBI 按升序(A->Z)或降序(Z->A)对列进行排序,那么如果必须应用他的自定义顺序,他应该如何实现呢?

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?

这是一个例子

在这里我们可以看到 X 轴上的顺序是升序的,或者我们可以显示它是降序的,但是如果我想根据我的需要对顺序进行排序呢?可能如下:

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 车轮预览 --> 1.2 GTR --> 1.2 Ultra --> 1.2 RTR

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

,是否可以在创建报告时在 PowerBI 桌面中使用,如果可以,那么将不胜感激.:)

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

谢谢.

推荐答案

向源数据添加一列,并使用所需排序顺序的值填充它.然后选择要自定义排序的列,然后单击建模 > 按列排序.选择新列作为现有列的 SortBy 列,如屏幕截图所示:SortCategory 列用作 Category 列的排序顺序.

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.

现在创建一个图表,轴上的类别将根据 SortCategory 列的值进行排序.

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

这篇关于PowerBI 图表中的自定义排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆