相关文章推荐
另类的人字拖  ·  react 使用 useEffect ...·  2 年前    · 
I tried to define a simple new calculated measure:
iif( Isempty([Measures].[Issue Start Date]),
now(),
[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: http://mondrian.pentaho.com/documentation/mdx.php
The workaround is to use a similar CASE construction:
case when
Isempty([Measures].[Issue Start Date]
now()
DateParse([Measures].[Issue Start Date])