Page 1 of 1

MDX Question (split from Primer thread)

Posted: Wed Jul 09, 2008 9:58 am
by Steve Vincent
Just starting to work my way thru this, its very helpful indeed :D

I have a question on subsets based on cube data tho. If i have a 7 dim cube and i wrote some MDX to evaluate the value from Dim1 Ele1 with that in Dim1 Ele2 without specifying any of the other dims, does it only "calculate" the set based on top levels for all the other dims? I have some code that's looking at any values that are ±1% between 2 scenarios. At top level its right but as you drill down the set doesn't change, which was the functionality i was looking to replicate. My current MDX is below, does anyone know a way of replicating what I'm aiming for?

Code: Select all

{UNION (
{FILTER (
  {TM1SUBSETALL( [Ops Plan OBS] )}
,  ([ops plan].([Version].[Current Prog Req Supp], [Ops Plan Measures].[Ops Plan Headcount]))
 - ([ops plan].([Version].[Current Agreed Sol], [Ops Plan Measures].[Ops Plan Headcount]))
 > [ops plan].([Version].[Current Prog Req Supp], [Ops Plan Measures].[Ops Plan Headcount]) * 0.01
)}
,
{FILTER (
  {TM1SUBSETALL( [Ops Plan OBS] )}
,  ([ops plan].([Version].[Current Agreed Sol], [Ops Plan Measures].[Ops Plan Headcount]))
 - ([ops plan].([Version].[Current Prog Req Supp], [Ops Plan Measures].[Ops Plan Headcount]))
 > [ops plan].([Version].[Current Prog Req Supp], [Ops Plan Measures].[Ops Plan Headcount]) * 0.01
)}
)}