Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Subtract Today() from a Column

Hello  I am using a formula in excel (=IF(AY2<>"NA",TODAY()-BB2,"OPEN")).  I want to subtract Column "BB" using Today() function if value in column "AY" is not equal to "NA" in form of number...
  • parry2k's avatar
    4 years ago

    Anonymous sorry missed a parenthesis

     

    New Column Name = IF(Table[AY2 Column Name] <> "NA", 
    FORMAT ( DATEDIFF ( TODAY(), Table[BB2 Column Name], DAY ), "General Number" ),
    "OPEN")
    ). 

     

     

     

    Follow us on LinkedIn and  to our YouTube channel

     

    Check my latest video on Filters and Sparklines https://youtu.be/wmwcX8HvNxc

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

     

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

  • parry2k's avatar
    4 years ago

    Anonymous sorry, just reverse the column in the datediff

     

     DATEDIFF ( Table[BB2 Column Name], TODAY(),  DAY )
    

     

    Follow us on LinkedIn and  to our YouTube channel

     

    Check my latest video on Filters and Sparklines https://youtu.be/wmwcX8HvNxc

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

     

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.