Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
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
Proud to be a Datanaut!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!