Forum Discussion
Anonymous
6 years agoNot applicable
Help with Date Calculated column
Hi all, I am trying to create a calculated column where in if date is equal to "2019/11/24" then print Static otherwise the date value. I am using the below two logic but keep getting an error - ...
- 6 years ago
Try like
Column = If(Table1[date] = Date(2019,11,24),"Static",format(Table1[date],"dd-mm-yyyy hh:mi:ss"))
for full set of options refer
https://docs.microsoft.com/en-us/dax/custom-date-and-time-formats-for-the-format-function
v-lionel-msft
6 years agoCommunity Support
Hi Anonymous ,
This error is reported because your calculated column returned two types of data: text & date.
So, you can refer to amitchandak 's answer.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.