Forum Discussion

jonnyA's avatar
jonnyA
Icon for Responsive Resident rankResponsive Resident
5 years ago
Solved

Formula for Days back minus 2 days from current date

Hey! I'm hoping someone can help me come up with a formula for "Days back minus 2 (From current date)".  Not sure if you will need the current "Fields" i was given in the dataset, but here they are ...
  • selimovd's avatar
    5 years ago

    Hey jonnyA ,

     

    depends on what exactly you are doing.

    You can just use your date and do a minus 2, for example as a calculated column:

    Day before yesterday = myTable[Date] - 2

     

    To calculate the date proper I would use the DATEADD function:

    DATEADD ( DateTable[Date] , -2, DAY )  

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis
     
  • jonnyA's avatar
    5 years ago
    Today - 2 = TODAY() - 2
     
    The measure above on this text ended up working for me!  But the one you gave me helped me get going ion figuring it out, so thank you!