eo
MIS
- Apr 3, 2003
- 809
I have been battling with this for over a week now, and am now ready to admit defeat and ask for help!!
I have an MDX expression which creates a measure (either 1 or null) if a condition is met. I got this working, but forgot that it should apply to more than one dimension attribure hierarchy. Now I am struggling to put it all together and it should work no matter which one of three dimension attribure hierarchies are selected.
The dimension looks like this:
I am thinking I need to use a CASE statement to code the MDX that will ultimately return a 1 or NULL irrespective of whether DevYear, DevQuarter or DevMonth is selected.
How do I define this? The MDX needs to know to do A if [TRIANGULATION].[DevYear] is selected, do B if [TRIANGULATION].[DevMonth] is selected, and do C is [TRIANGULATION].[DevQuarter] is selected. I tried the following, but this does not work...
Any ideas if this is indeed even possible
EO
Hertfordshire, England
I have an MDX expression which creates a measure (either 1 or null) if a condition is met. I got this working, but forgot that it should apply to more than one dimension attribure hierarchy. Now I am struggling to put it all together and it should work no matter which one of three dimension attribure hierarchies are selected.
The dimension looks like this:
Code:
Dimension - TRIANGULATION
Attribute - DevYear
Attribute - DevQuarter
Attribute - DevMonth
Or Hierarchy - TRIANGULATE
> DevYear
> DevQuarter
> DevMonth
I am thinking I need to use a CASE statement to code the MDX that will ultimately return a 1 or NULL irrespective of whether DevYear, DevQuarter or DevMonth is selected.
How do I define this? The MDX needs to know to do A if [TRIANGULATION].[DevYear] is selected, do B if [TRIANGULATION].[DevMonth] is selected, and do C is [TRIANGULATION].[DevQuarter] is selected. I tried the following, but this does not work...
Code:
CASE
WHEN [TRIANGULATION].[DevYear] IS TRUE THEN IIF(expr, true, false)
WHEN [TRIANGULATION].[DevQuarter] IS TRUE THEN IIF(expr, true, false)
WHEN [TRIANGULATION].[DevMonth] IS TRUE THEN IIF(expr, true, false)
Any ideas if this is indeed even possible
EO
Hertfordshire, England