cancel
Showing results for 
Search instead for 
Did you mean: 
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
Solution Sage
Solution Sage

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.

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
Solution Sage
Solution Sage

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.

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors