Forum Discussion
Irregular Behaviour DAX
- 7 years ago
Hi Anonymous,
When I recreated this, the columns were type Text so I tried this:
IsValidNow = VAR _VALID_TO = DATEVALUE(Pricelist_ADLS[Valid To]) VAR _TODAY = TODAY() RETURN IF(_VALID_TO >=_TODAY,"Yes","No")
If the format was important to you for other reasons, you can wrap your original FORMAT() in a DATEVALUE() - I tried that as well and it works (but this is simpler).
- Anonymous7 years ago
Think the issue here is when you format the date it changes the data type to text. There's no need to format it though, you can just use
Column = if( Table2[Valid To] >= Now(), "Yes", "No")
I'd suggest comparing using date column without any hardcoded formats - that way you effectively compare integers which should always give the same outcome.
I'd only use formatting for the final presentation after all the comparisons
Thanks For the suggestions, As expected the Dashboard looks perfect for European customer as both the date format match for them(I left the default values of dates, no hardcoding).
Thanks.