我需要一个快速的帮助下面的MDX查询
问题描述:
我希望一次我需要一个快速的帮助下面的MDX查询
case
when [measure].[frequency] >3 and [poa].[segment].&A then 'red'
when [measure].[frequency] <3 and [poa].[segment].&A then 'yellow'
when [measure].[frequency] =3 and [poa].[segment].&A then 'Green'
else 'NA' end
这些我已经写在计算成员脚本..筛选的指标和维度的资料,但并不成功运行。亲爱的帮助我们
答
您是否需要在案例中添加currentMember比较?
我想这会工作好吗?
case
when [measure].[frequency] >3 then 'red'
when [measure].[frequency] <3 then 'yellow'
when [measure].[frequency] =3 then 'Green'
else 'NA'
end
虽然您是否必须使用'NA'?在这种情况下你不能使用null
吗?
case
when [measure].[frequency] >3 then 'red'
when [measure].[frequency] <3 then 'yellow'
when [measure].[frequency] =3 then 'Green'
else NULL
end
你计算的其他部分看起来像它需要使用IS
运营商这样的比较[poa].[segment].&A
反对的东西:
([poa].CURRENTMEMBER IS [poa].[segment].&A)
所以加入这个到case
声明:
CASE
WHEN [measure].[frequency] >3
AND ([poa].CURRENTMEMBER IS [poa].[segment].&A) THEN 'red'
WHEN [measure].[frequency] <3
AND ([poa].CURRENTMEMBER IS [poa].[segment].&A) THEN 'yellow'
WHEN [measure].[frequency] =3
AND ([poa].CURRENTMEMBER IS [poa].[segment].&A) THEN 'Green'
ELSE NULL
END
请尽快帮助我 – Adi
为什么它不起作用?你得到一个错误或不正确的结果?提供错误结果和期望结果的截图。 – GregGalloway
它显示像#valueerr – Adi