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
drewmcspy
Frequent Visitor

If cell contains ANY text blank it, else pull value of cell

Hi All

 

I have a Date (Date1) column where people have a tendency to put TBC until they know the date to enter. Due to this I'm having to transform the format of the column to text from date to avoid the Error. 

 

Are there any suggestions for this?

 

My only thought is the subject. I thought I could create a new date column (Date2) and write a formula saying:

 

If(

Date1 column contains ANY text (a,b,c,d,e,f,g,...etc),

Blank,

Date1 value)

 

Where I need help is: What is the dax formula needed to identify any text.

 

Thanks in advance

 

drewmcspy

2 ACCEPTED SOLUTIONS
jgeddes
Super User
Super User

You can add a new column with 

IFERROR(DATEVALUE([Date]), BLANK())
It will replace anything that is not a date with a blank.
You can then format the new column as date.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

drewmcspy
Frequent Visitor

That worked a treat and so simple too. Thanks

View solution in original post

2 REPLIES 2
drewmcspy
Frequent Visitor

That worked a treat and so simple too. Thanks

jgeddes
Super User
Super User

You can add a new column with 

IFERROR(DATEVALUE([Date]), BLANK())
It will replace anything that is not a date with a blank.
You can then format the new column as date.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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.