Forum Discussion
StoryofData
3 years agoHelper III
Empty Date Value
Wondering if there a smart way to do this, I have table with cases and their open and closed dates. For the times when the case is still open, I want the card to show "Still Open", I have achieved ...
- 3 years ago
sure 🙂
Date Closed Blank = COALESCE(FORMAT(CALCULATE(MAX('Query1'[DateClosed])),"MM/DD/YYYY") , "Still Open")
StoryofData
3 years agoHelper III
Thank you! So there is no way to have only one measure to achieve this?
lbendlin
3 years agoSuper User
sure 🙂
Date Closed Blank = COALESCE(FORMAT(CALCULATE(MAX('Query1'[DateClosed])),"MM/DD/YYYY") , "Still Open")
- StoryofData3 years agoHelper III
Thank you!
- StoryofData3 years agoHelper IIIFor some reason, it produces a blank instead of "Still Open", meaning the card does not show anything at all. Could there be an issue?
=COALESCE(FORMAT(CALCULATE(MAX('Query1'[DateClosed])),"MM/DD/YYYY"),"Still Open")- lbendlin3 years agoSuper User
Ah, right, I remember. There is a bug in FORMAT that happily returns an empty string instead of BLANK().
Oh well, back to your version.
=IF(ISBLANK(MAX('Query1'[DateClosed])),"Still Open",FORMAT(MAX('Query1'[DateClosed]),"MM/DD/YYYY"))
- StoryofData3 years agoHelper III
Thank you! Works now!
And, interesting, I guess that bug can be used to our advantage in some cases