MDX 销售额与上月比较
with member [RatioToAll] as
'[Measures].[Sale Num List]/([Measures].[Sale Num List],[Ga View Publisher Info].[出版社名称].[All])',FORMAT_STRING = '0.00%'
member [LastMonthSalesNumList] as
([Measures].[Sale Num List],[Dim Time2].[YearMonth].PREVMEMBER)
member [CompareLastMonth] as
([LastMonthSalesNumList] - [Measures].[Sale Num List])
select
{[Measures].[Sale Num],[Measures].[Sale Num List],[RatioToAll],
[LastMonthSalesNumList],[CompareLastMonth]} on 0,
order(
crossjoin(
{[Dim Time2].[YearMonth].&[200501]:[Dim Time2].[YearMonth].&[200503]},
{[Ga View Publisher Info].[出版社名称].Members} ) ,
[Measures].[Sale Num List], desc)
on 1
from [Open Book Data View]
'[Measures].[Sale Num List]/([Measures].[Sale Num List],[Ga View Publisher Info].[出版社名称].[All])',FORMAT_STRING = '0.00%'
member [LastMonthSalesNumList] as
([Measures].[Sale Num List],[Dim Time2].[YearMonth].PREVMEMBER)
member [CompareLastMonth] as
([LastMonthSalesNumList] - [Measures].[Sale Num List])
select
{[Measures].[Sale Num],[Measures].[Sale Num List],[RatioToAll],
[LastMonthSalesNumList],[CompareLastMonth]} on 0,
order(
crossjoin(
{[Dim Time2].[YearMonth].&[200501]:[Dim Time2].[YearMonth].&[200503]},
{[Ga View Publisher Info].[出版社名称].Members} ) ,
[Measures].[Sale Num List], desc)
on 1
from [Open Book Data View]