Forum Discussion
Compare text with today()
I was able to convert the initial text date to datetime. So from Wednesday, 27 February, 2017 to 02/27/2017 12:00:00 AM . I went under the modeling tab and changed the data type from text to datetime.
The only problem is that the foloowing is still not working:
IF(DATEVALUE(offer_date) >= today(), "good job", "")
Note that 02/27/17 is greater than today's date (02/20/17). So, it should be displaying "good job", but it's not.
This is happening because you have values (more like errors) that cannot be coverted to Date!!!
Blanks would not cause this - but text that cannot be coverted to a date say 4/1/
- kaka9 years ago
Helper II
But I am not getting any such error.
- v-qiuyu-msft9 years ago
Community Support
Hi kaka,
Please try to click the Refresh button to refresh the data. Also update the desktop to latest version 2.43.4647.541.
You can also create a calculated column to return current date,
CurrentDate=Today()
Then create a calculated column:
IF(DATEVALUE(offer_date) >= CurrentDate, "good job", "")
If issue persists, would you please share the screenshots about the DAX and results for our analysis? If possible, please share the .pbix file.
Best Regards,
Qiuyun Yu