Current day vs same week day last week

Hi,

 

Does anyone know the beast mode to calculate revenue of last year on the same date? Current date minus one year? 

 

Thank you!

Comments

  • BlueRooster
    BlueRooster Domo Employee

    You could do something like this:

    CASE WHEN `Date` >= DATE_SUB(DATE_FORMAT(curdate(), '%Y-01-01'), INTERVAL 1 YEAR) 
    AND `Date` <= DATE_SUB(curdate(), INTERVAL 1 YEAR)
    THEN `Revenue`
    END

    This would return the revenue when it was between Jan 1 last year and current day last year.

     

    Let me know if you need anything else,

    ValiantSpur

     

    **Please mark "Accept as Solution" if this post solves your problem
    **Say "Thanks" by clicking the "heart" in the post that helped you.