Forum Discussion
naoyixue1
Post Patron
3 years agoHow to replace the value in power query or how to replace the error with formula in power query
Hey there,
There is a plan which will be refreshed every day. Since I will calculate the value based on date, the Past column causes the problem.
Original format as below
I t...
- 3 years ago
pls try this
try Date.FromText([Attribute],[Culture = "en-EN"]) otherwise Date.From( DateTime.LocalNow()) - 3 years ago
In my case, the previous step was called #"Changed Type". If that is not your last step (before adding this one), update that too. And just add
Date.ToText(Date.From(DateTime.LocalNow()))
to the pop-up box if you did it that way (not Table.AddColumn ...).
Share the M code from the Advanced Editor for your whole query if still stuck.
Pat
vicky_
Super User
3 years agoThere's an option to replace errors in Power Query
- naoyixue13 years ago
Post Patron
Yes. Since this one will be set to automatically refresh, I'd like to replace with whatever with fomula...Do you know how I can do that? I tried the M code with datetime.localnow(), but it doesn't work. Any thoughts? Thanks!