Forum Discussion
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
Thanks in advance
SE
- Anonymous5 years ago
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.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- VijayPCommunity Champion
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
- AnonymousNot applicable
I tried this , and no works
Thanks for reply , any suggestion are appreciates
- Greg_DecklerCommunity Champion
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.
- ryan_mayuSuper User
Anonymous
I did tests on this and get the same error message
However, it works in PQ, have you tried that
- AnonymousNot 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.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.