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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

How to Change empty value within date value

Hi @amitchandak @Greg_Deckler  and team 

 

Hope you are and team in well condition

 

I got an error while changing data type due there are empty field . [ Column Dockin Time
actually I have other column , which I'm willing use it to fill in to empty value . [ column Reporting time ]

 

as long as Dockin Time is empty , I expect to replace value with reporting time value in same row 

Id Date Blank.JPG

Thanks in advance
SE

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

I think I find the reason of this issue.

Your code is as below.

X.DIN = IF(Query1[DockInDateTime]="",Query1[VehicleReportingDateTime],Query1[DockInDateTime])

"" is text format, so you will get error. You can use isblank or blank instead of "".

Try this code.

X.DIN = IF(Query1[DockInDateTime]=BLANK(),Query1[VehicleReportingDateTime],Query1[DockInDateTime])

Result is as below.

2.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous 

I think I find the reason of this issue.

Your code is as below.

X.DIN = IF(Query1[DockInDateTime]="",Query1[VehicleReportingDateTime],Query1[DockInDateTime])

"" is text format, so you will get error. You can use isblank or blank instead of "".

Try this code.

X.DIN = IF(Query1[DockInDateTime]=BLANK(),Query1[VehicleReportingDateTime],Query1[DockInDateTime])

Result is as below.

2.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ryan_mayu
Super User
Super User

@Anonymous 

I did tests on this and get the same error message

1.PNG

However, it works in PQ, have you tried that

2.PNG





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

Proud to be a Super User!




VijayP
Super User
Super User

@Anonymous  create a Custom Column with 

 

if condition

if 1st column=""  then 2nd column value else 1st column value.

That should help you get all values and can avoid error




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

syaifulefendi_0-1628344938869.png

I tried this , and no works 

 

Thanks for reply , any suggestion are appreciates

@Anonymous You will need to make sure that the two columns used in your true and false returns are both of the same type. Make sure that one is not a text field and the other date for instance.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.