Hi All,
I am trying to have a calculated measure which will return a date field value eg: End Date
IF there is no value in this field it should return today.
What would be the right way to get this measure.
Thanks.
What I have done so far without luck :
iff(IsEmpty([Issue].CurrentHierarchyMember.get(‘Actual end’)),Now(),[Issue].CurrentHierarchyMember.get(‘Actual end’))
Hi @mizanalisayed,
Thanks for posting your question!
If you would like a function to return the dates, I suggest using one of the following functions instead of IIF:
- CASE WHEN:
CASE WHEN
NOT IsEmpty([Issue].CurrentHierarchyMember.get('Actual end'))
THEN
[Issue].CurrentHierarchyMember.get('Actual end')
ELSE
Now()
END
- CoalesceEmpty
TimestampToDate(
CoalesceEmpty(
DateToTimestamp([Measures].[Issue Actual end]),
DateToTimestamp(DateParse("now"))
)
)
Make sure that you change Formatting to Date/Time:
I hope this helps!
Best,
Marita support@eazybi.com
The second option of CoalesceEmpty works as expected for me .
Thanks Marita.
1 Like