Simple IIF formula not working, what am I doing wrong?

I tried to define a simple new calculated measure:
iif( Isempty([Measures].[Issue Start Date]),
[Measures].[Issue Start Date]

The logic is very simple: I look in the issue property “Start Date” (A custom field). If it’s empty, I would like to get now(), otherwise I would like to get the start date.

However, I got this error:
Formula is not valid: No function matches signature ‘iif(, , )’

What am I doing wrong?
I used IIF many times until now without any problem. This is is not working for some reason


Unfortunately, the IIF function can not work with the date datatype. The reason is the implementation of the MDX language by Mondrian. Please, check here the allowed signatures of the IIF function:

The workaround is to use a similar CASE construction:
case when
Isempty([Measures].[Issue Start Date]
DateParse([Measures].[Issue Start Date])

1 Like

Great! Indeed it works now. Thank you