MDX 值而不是 0-1
MDX value instead of 0-1
CASE
WHEN
(
[Date].[Hierarchy].CurrentMember
,[Measures].[Billing Reporting CFS - Total Amount EUR]
)
+ 0
= 0
THEN
CASE
WHEN
(
ParallelPeriod
(
[Date].[Hierarchy].[Month]
,1
,[Date].[Hierarchy].CurrentMember
)
,[Measures].[Billing Reporting CFS - Total Amount EUR]
)
> 0.01
THEN 1
ELSE 0
END
ELSE 0
END
代码如下,当月总销量-实际销量为0,如果上个月的总销量与本月的金额不同,则为1。但是我希望1改变实际金额那已经改变了我将如何处理这个?
提前致谢。
编辑
如果值高于 0.01,那么我想查看实际值,我该怎么做?
CASE
WHEN
(
[Date].[Hierarchy].CurrentMember
,[Measures].[Billing Reporting CFS - Total Amount EUR]
)
+ 0
= 0
THEN
CASE
WHEN
(
ParallelPeriod
(
[Date].[Hierarchy].[Month]
,1
,[Date].[Hierarchy].CurrentMember
)
,[Measures].[Billing Reporting CFS - Total Amount EUR]
)
> 0.01
THEN ParallelPeriod([Date].[Hierarchy].[Month],1,[Date].Hierarchy].CurrentMember),[Measures].[Billing Reporting CFS - Total Amount EUR]
ELSE 0
END
ELSE 0
END
就是答案
CASE
WHEN
(
[Date].[Hierarchy].CurrentMember
,[Measures].[Billing Reporting CFS - Total Amount EUR]
)
+ 0
= 0
THEN
CASE
WHEN
(
ParallelPeriod
(
[Date].[Hierarchy].[Month]
,1
,[Date].[Hierarchy].CurrentMember
)
,[Measures].[Billing Reporting CFS - Total Amount EUR]
)
> 0.01
THEN 1
ELSE 0
END
ELSE 0
END
代码如下,当月总销量-实际销量为0,如果上个月的总销量与本月的金额不同,则为1。但是我希望1改变实际金额那已经改变了我将如何处理这个? 提前致谢。
编辑
如果值高于 0.01,那么我想查看实际值,我该怎么做?
CASE
WHEN
(
[Date].[Hierarchy].CurrentMember
,[Measures].[Billing Reporting CFS - Total Amount EUR]
)
+ 0
= 0
THEN
CASE
WHEN
(
ParallelPeriod
(
[Date].[Hierarchy].[Month]
,1
,[Date].[Hierarchy].CurrentMember
)
,[Measures].[Billing Reporting CFS - Total Amount EUR]
)
> 0.01
THEN ParallelPeriod([Date].[Hierarchy].[Month],1,[Date].Hierarchy].CurrentMember),[Measures].[Billing Reporting CFS - Total Amount EUR]
ELSE 0
END
ELSE 0
END
就是答案