I have a row dimension, Course, which I want to filter by the values of two other title dimensions, Level and Mode. Course has element attributes which match the values of Level and Mode.
I put together this bit of MDX that works fine when selecting any combination of Level or Mode:
Code: Select all
{FILTER(
{FILTER(
{TM1SubsetAll([Course])},
[Course].[Programme Type]=[GLOBAL Level].CurrentMember.Name
)
},
[Course].[Mode]=[GLOBAL Mode].CurrentMember.Name
)
}
Code: Select all
{UNION(
IIF(
[GLOBAL Level].CurrentMember.Name<>"All Levels",
{FILTER(
{TM1SubsetAll([Course])},
[Course].[Programme Type]=[GLOBAL Level].CurrentMember.Name
)
},
{TM1SubsetAll([Course])}),
IIF(
[GLOBAL Mode].CurrentMember.Name<>"All Modes",
{FILTER(
{TM1SubsetAll([Course])},
[Course].[Mode]=[GLOBAL Mode].CurrentMember.Name
)
},
{TM1SubsetAll([Course])})
)
}
Is it my UNION or IIF that is wrong? I have checked the logic and can't see anything obviously amiss. What have I missed?