简体   繁体   English

如何在 SSAS 表格 pivot 中按降序对过滤器值进行排序?

[英]How to sort filter values in descending order in SSAS tabular pivot?

I have a calendar table in my SSAS Tabular model with a "Risk Month Name" column sorted by "Risk Month Number" column.我的 SSAS 表格 model 中有一个日历表,其中“风险月份名称”列按“风险月份编号”列排序。

在此处输入图像描述

Having that config gives me month names sorted in the ascending order in the connected pivot table.有了该配置,我就可以在连接的 pivot 表中按升序排列月份名称。

在此处输入图像描述

I'm trying to sort month names in the pivot filter in descending order.我正在尝试按降序对 pivot 过滤器中的月份名称进行排序。

I understand that I can create an extra calculated column with some values already sorted in the descending order and use this column as a sorting column for the "Risk Month Name" values.我知道我可以创建一个额外的计算列,其中一些值已经按降序排序,并将此列用作“风险月份名称”值的排序列。 But doing this feels wrong and extra complicated for such a simple requirement.但是对于这样一个简单的要求,这样做感觉是错误的并且更加复杂。

Is there any setting to do it in a proper way?是否有任何设置可以以正确的方式进行?

If you change your RiskMonthNumber column to have a negative sign in front of it the sort order should reverse as you are expecting.如果您将 RiskMonthNumber 列更改为在其前面有一个负号,则排序顺序应如您预期的那样反转。 If RiskMonthNumber is visible to users then create another hidden column for this purpose.如果 RiskMonthNumber 对用户可见,则为此创建另一个隐藏列。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM