为此mdx查询获取上述错误:
With
member [Measures].[MTD1] as
Sum({StrToMember('[Year Month Day].[Date].&[' + FORMAT(Now(), 'yyyy') + '-' + FORMAT(Now(),'mm') + '-01' + ']')
: StrToMember('[Year Month Day].[Date].&[' + FORMAT(Now(), 'yyyy') + '-' + FORMAT(Now(),'mm') + FORMAT(Now(),'dd') + ']')}
, [Measures].[Amount])
member [Measures].[MTD2] as
Sum({StrToMember('[Year Month Day].[Date].&[' + FORMAT(Now(), 'yyyy') + '-' + FORMAT(dateadd('mm',-1,now())) + '-01' + ']')
: StrToMember('[Year Month Day].[Date].&[' + FORMAT(Now(), 'yyyy') + '-' + FORMAT(dateadd('mm',-1,now())) + FORMAT(Now(),'dd') + ']')}
, [Measures].[Amount])
member [Measures].[%MTD Growth] as
([Measures].[MTD1]-[Measures].[MTD2])/[Measures].[MTD1], FORMAT_STRING='0.00%'
Select {[Measures].[Amount],[Measures].[MTD1],[Measures].[MTD2],[Measures].[%MTD Growth]} ON COLUMNS,
[Transaction Place].Members ON ROWS
from [TXNSumCube]
日期存储为yyyy-mm-dd
答案 0 :(得分:1)
对于mondrian而不是' +',请使用' ||'。