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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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