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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Replace Null values with a current time stamp in datetime column

Hi Team,

i am new to power bi. i  ahve a data sets which holds DATETIME column which have some NULL values . which i want to replace with the current time stamp. please help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Anonymous,

I'd like to suggest you use replace value function to directly replace these null value to default value(you can't directly use power query function in the navigation pane), then you can use DateTime.LocalNow function to replace that static value to local DateTime.(replace value will auto changes when local datetime changes)

83.gif

Regards,

Xiaoxin Sheng

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

HI @Anonymous,

I'd like to suggest you use replace value function to directly replace these null value to default value(you can't directly use power query function in the navigation pane), then you can use DateTime.LocalNow function to replace that static value to local DateTime.(replace value will auto changes when local datetime changes)

83.gif

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@Anonymous , In Data transformation you have the option to replace value try that or create a new column in dax like this

https://yodalearning.com/tutorials/learn-how-replace-values-power-query/

https://docs.microsoft.com/en-us/power-bi/desktop-shape-and-combine-data

 

DAX

New column= if(isblank([datetime]),now(),[datetime])

OR

New column= coalesce([datetime],now())

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
az38
Community Champion
Community Champion

Hi @Anonymous 

create a new column

Column = IF(ISBLANK(Table[datetime]), NOW(), Table[datetime])

or a custom column in power query editor

= if [datetime] = null then DateTime.LocalNow() else [datetime]

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

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

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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