Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
30rakesh
Regular Visitor

Need formula to get the current date if a field is blank

Hi,

 

I am getting the below error when I use the calculated colummn (new column) - Column = IF(ISBLANK(Table1[endDate]), TODAY(), Table1[endDate]).

 

Erorr: expressions that yield variant data-type cannot be used to define calculated columns

 

Could you please help me with the correct expression.

 

Thanks

Rakesh

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

@30rakesh your [endDate] column must not be Data Type =>Date! Change it to Date!

 

Date.png

View solution in original post

2 REPLIES 2
Sean
Community Champion
Community Champion

@30rakesh your [endDate] column must not be Data Type =>Date! Change it to Date!

 

Date.png

Thanks Sean. It worked.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.