如何将ORDER添加到基于MDX的参数

时间:2018-01-25 18:29:45

标签: reporting-services mdx

如何将以下数据集查询更改为按员工姓名

排序
empty

1 个答案:

答案 0 :(得分:1)

你可以尝试添加ORDER功能 - 虽然我需要测试,因为我不确定它是否会起作用:

WITH 
MEMBER [Measures].[ParameterCaption] AS 
[Employee].[Employee Name].CURRENTMEMBER.MEMBER_CAPTION 
MEMBER [Measures].[ParameterValue] AS 
[Employee].[Employee ID].CURRENTMEMBER.UNIQUENAME 
MEMBER [Measures].[ParameterLevel] AS 
[Employee].[Employee ID].CURRENTMEMBER.LEVEL.ORDINAL 
SELECT 
{[Measures].[ParameterCaption]
, [Measures].[ParameterValue]
, [Measures].[ParameterLevel]} ON COLUMNS , 
ORDER(
  [Employee].[Employee ID].ALLMEMBERS,
  [Measures].[ParameterCaption],
  BDESC
)ON ROWS 
FROM ( SELECT ( STRTOSET(@ReportingCurrencyReportingCurrency, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@PROJGROUPProjGroup, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@CompanyCompanyAccounts, CONSTRAINED) ) ON COLUMNS FROM [ACTIVITY])))