Forum Discussion

naoyixue1's avatar
naoyixue1
Icon for Post Patron rankPost Patron
3 years ago
Solved

How 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...
  • Ahmedx's avatar
    3 years ago

    pls try this

    try Date.FromText([Attribute],[Culture = "en-EN"]) otherwise Date.From( DateTime.LocalNow())

  • ppm1's avatar
    ppm1
    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