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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.