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
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
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.