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
Syndicate_Admin
Administrator
Administrator

Replace null to localnow not working

Hi,

I'm trying to replace a null in a datetime field with current date/time.

Unfortunately the replace isn't working (see below)

 

Any suggestions greatly welcomed!

Thanks for your time.

 

 

1 REPLY 1
BA_Pete
Super User
Super User

Hi,

 

There's a few possible issues here:

1) The column that's highlighted in your screenshot doesn't have any nulls in it, so not sure what the problem is.

2) If it's actually the column to the left of the highlighted one (the one with an actual null in it) that you're trying to make the replace on, then you'll need to update the final argument ( {"Column...Due"} ) to reflect the name of the actual column you want to make the replace on.

3) The second argument in your Table.ReplaceValue function stipulates that you're trying to replace a datetime ( #datetime(1900,1,1,0,0,0) ) not a null.

4) You're not declaring the third argument as a function to generate your replacement datetime. I think this should be DateTimeZone.LocalNow(), noting the open/close parentheses at the end.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




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.