-1
我很困惑mdx看起來像返回所有本月下訂單但未下訂單的客戶( $ 0銷售額)爲上一年同月。MDX向客戶展示本月已下訂單但不是去年本月的客戶
我將Order Amount作爲度量值,CustomerId作爲維度,Date作爲維度。
我很困惑mdx看起來像返回所有本月下訂單但未下訂單的客戶( $ 0銷售額)爲上一年同月。MDX向客戶展示本月已下訂單但不是去年本月的客戶
我將Order Amount作爲度量值,CustomerId作爲維度,Date作爲維度。
你需要添加一些你已經嘗試過的代碼。
在mdx
僞代碼將是這樣的:
Except(
NonEmpty(
{all members} //<<try a function that returns a set such as `.MEMBERS`
,(thisMonth, OrderAmountMeasure) //<<the braces mean this is a tuple made up of two members
)
,NonEmpty(
{all members}
,(equivMonthLastYear, OrderAmountMeasure) //<<you could try the .LAG function to go back 12 months
)
)
編輯:
iif(
equivMonthLastYear = 0,
null,
Except(
NonEmpty(
{all members} //<<try a function that returns a set such as `.MEMBERS`
,(thisMonth, OrderAmountMeasure) //<<the braces mean this is a tuple made up of two members
)
,NonEmpty(
{all members}
,(equivMonthLastYear, OrderAmountMeasure) //<<you could try the .LAG function to go back 12 months
)
)
)
你的僞代碼工作,除了當有在多維數據集equivMonthLastYear沒有價值。在這種情況下,我不想返回currentMonthThisYear。 – user5982263
@ user5982263您可以通過'IIF'功能添加一些額外的邏輯:https://msdn.microsoft.com/en-us/library/ms145994.aspx?f=255&MSPPError=-2147217396 – whytheq