WITH
MEMBER [Rank] AS
Rank
(
[All Products].[Group 2].CurrentMember
,Order
(
[All Products].[Group 2].MEMBERS
,[Measures].[test]
)
)
SELECT
[Rank] ON COLUMNS
,[All Products].[Group 2].MEMBERS ON ROWS
FROM [cube];
错误:“Rank”维度包含多个层次结构,因此必须明确指定层次结构。 执行完成
答案 0 :(得分:0)
使用rank
的标准方法是在命中等级函数之前对集合进行排序:
WITH
SET [OrderedGroup] AS
Order
(
[All Products].[Group 2].MEMBERS
,[Measures].[test]
)
MEMBER [Rank] AS
Rank
(
[All Products].[Group 2].CurrentMember
,[OrderedGroup]
)
SELECT
[Rank] ON COLUMNS
,[All Products].[Group 2].MEMBERS ON ROWS
FROM [cube];
以下是我就Rank
撰写的上一篇文章的参考:
Apply RANK function to a set according to alphabetical order