Is it possible to sum an IIF statment in MDX?
Here’s an example of what I am trying to do:
With
Member [dim something].[group].[Summed] as
Sum(
iif( [dim something].[date one] = [dim date].[specific date],1,0)
)
Select [dim something].[group].[summed] on 0,
[dim date].[specific date].members on 1
From [Cube]
I know this does not work, just trying to show what I am trying to do. I want to evaluate a condition and return a 1 or zero based on that condition. Then sum or count the number of times it was returned as 1
Fairly new to MDX, coming from a SQL background it’s very different.
IF
[dim something].[date one]is every only one date for your query then it would be something like the following