Forum Discussion
Anonymous
3 years agoNot applicable
Replace Null Dates with Today's Date
Hello, I have a dataset which includes a date column where there are nulls. I'd like to replace these nulls with today's date. So the example above should look something like this at the end: ...
- 3 years ago
Hi Anonymous
You can achieve it with 3 simple steps:
1. Add customed column :
DateTime.Date( DateTime.LocalNow() )2. Use it in condition and add Fixed column :
if [Date]=null then DateTime.Date( DateTime.LocalNow() )
else [Date]3. remove the original date column and change data type of added to date
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Ahmedx
Super User
3 years agopls see my video
https://1drv.ms/v/s!AiUZ0Ws7G26RiVSw1ipJO7nPhEFf?e=hNDrFe
Table.TransformColumns( #"Changed Type",{"Business Days", (x)=> if x= null then Date.From( DateTime.LocalNow()) else x})