Forum Discussion
Calculate a text value from a date column
Hi gurus!
I need your help as im trying to add a calculated column on a table.
Basically I need everything greater than today's date to be classified as "new", I've tried to do something like this:
Status= IF('OSS Credit Notes'[InvoiceDate]>= TODAY()-1, "New", 'OSS Credit Notes'[InvoiceDate])
But I don't think is possible to assign text values from a date field... as i get the following warning:
"expressions that yield variant data-type cannot be used to define calculated columns"
Anyone with any solution? 😁
Thank you!
3 Replies
- FreemanZ
Super User
just try like:
Status= IF('OSS Credit Notes'[InvoiceDate]>TODAY(), "New", 'OSS Credit Notes'[InvoiceDate])
- RobertoArreola8Regular Visitor
Thank you! But it seems still is not working 😔
I keep getting the same warning:
- FreemanZ
Super User
AHA try like
Status= IF([InvoiceDate]>TODAY(), "New", FORMAT([InvoiceDate], "YYYY/MM/DD"))