蒙德里安错误:没有函数匹配签名'<string> + <string>'

时间:2016-09-05 09:34:51

标签: mdx mondrian

为此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

1 个答案:

答案 0 :(得分:1)

对于mondrian而不是&#39; +&#39;,请使用&#39; ||&#39;。