Forum Discussion

NeroX's avatar
NeroX
Helper I
3 years ago
Solved

Replace values to formula

Hello,

 

How can i use formula to "Replace values" ?

I have column with dates and i want replace values "null" to formula "=TODAY()"

 

What can i do? 

 

Thank you.

  • Hi NeroX ,

     

    First, replace null with a date value:

     

    Then, in the formula bar, change the auto-generated code from this:

     

    ...to this:

     

    Pete

4 Replies

  • Hi NeroX ,

     

    First, replace null with a date value:

     

    Then, in the formula bar, change the auto-generated code from this:

     

    ...to this:

     

    Pete

    • Einomi's avatar
      Einomi
      Helper V

      Sorry BA_Pete our messages crossed each other

       

      Your solution is better 🙂 glad to see it 🙂

    • NeroX's avatar
      NeroX
      Helper I

      Thank you both.

       

      It is solved. 🙂

  • I would create a blank query, that will give me today's date and will rename this query DateNow

     

    = Date.From(DateTime.LocalNow())

     

    Then on your date replace the null values by any date, then tweak the M code as below

     

    = Table.ReplaceValue(#"Type modifié",null,DateNow,Replacer.ReplaceValue,{"Date"})

     

    And it should work

     Let us know