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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
rlmeyer
Resolver I
Resolver I

DAX Formula to Check if Text is in Date Format

I am wanting to use a calcuated column to take a list of text from a software where the users enter in a date and then output a date for other fields in my dashboard. The software does not have the ability to force the user to only enter in the text in a date format. The user can leave the field blank, enter in text, etc.

 

The field the data is pulling from is (PropertiesList[Start Date]) and if the user left the field blank or input text that is not in date format, I want the calcuated column to use the date that the file was created (DataDetails[CreatedDate]).

 
Is there a way to use a formula to evaluate if the (PropertiesList[Start Date]) field has the text in a date format and if not use the (DataDetails[CreatedDate]) field?
 
Something along the lines of IF IS DATE or IF FORMAT is Date?
1 ACCEPTED SOLUTION
rlmeyer
Resolver I
Resolver I

I figured out a way to check this for my current dataset. A nested IF statment that checks for errors with a DateValue function and then checks for blank data.
 
Start Date =
IF(ISERROR(DATEVALUE(PropertiesList[Start Date])),
FORMAT(DataDetails[CreatedDate],"Short Date"),
IF(ISBLANK(PropertiesList[Start Date]),
FORMAT(DataDetails[CreatedDate],"Short Date"),
PropertiesList[Start Date]))

 

View solution in original post

1 REPLY 1
rlmeyer
Resolver I
Resolver I

I figured out a way to check this for my current dataset. A nested IF statment that checks for errors with a DateValue function and then checks for blank data.
 
Start Date =
IF(ISERROR(DATEVALUE(PropertiesList[Start Date])),
FORMAT(DataDetails[CreatedDate],"Short Date"),
IF(ISBLANK(PropertiesList[Start Date]),
FORMAT(DataDetails[CreatedDate],"Short Date"),
PropertiesList[Start Date]))

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.