在MDX中,给定数字的价格等级为0
我有一个OLAP多维数据集,其中包含每个数字的类型price sum 使用MDX,如何输出给定数字的秩 结果如下: Heare是MDX查询,但所有秩值均为0。问题出在哪里在MDX中,给定数字的价格等级为0,mdx,pivot-table,olap-cube,Mdx,Pivot Table,Olap Cube,我有一个OLAP多维数据集,其中包含每个数字的类型price sum 使用MDX,如何输出给定数字的秩 结果如下: Heare是MDX查询,但所有秩值均为0。问题出在哪里 WITH MEMBER [Measures].[Rank Sum of price] AS RANK([NUM_1].[All Numbers].CURRENTMEMBER ,[NUM_1].[All Numbers] ,[Measures].[Sum of price]) SELECT { [M
WITH MEMBER [Measures].[Rank Sum of price] AS
RANK([NUM_1].[All Numbers].CURRENTMEMBER
,[NUM_1].[All Numbers]
,[Measures].[Sum of price])
SELECT
{
[Measures].[Sum of price]
, [Measures].[Rank Sum of price]
}
ON COLUMNS,
[NUM_1].[All Numbers]
ON ROWS
FROM schema1
在使用秩函数之前,可以在自定义集中进行排序:
WITH
SET OrderedNums AS
Order
(
[NUM_1].[All Numbers].[All Numbers].MEMBERS
,[Measures].[Sum of price]
,BDESC
)
MEMBER [Measures].[Rank Sum of price] AS
Rank
(
[NUM_1].[All Numbers].CurrentMember
,OrderedNums
)
SELECT
{
[Measures].[Sum of price]
,[Measures].[Rank Sum of price]
} ON 0
,[NUM_1].[All Numbers].[All Numbers].MEMBERS ON 1
FROM schema1;