4 Replies Latest reply on Nov 30, 2018 7:50 AM by saujanya E

    Compare sales over Easter in current year to previous year

    luisa.bez

      I've built a dashboard that enables the user to select any date range and return the sales for that period and compare it to sales in the same period last year. However, the client is also interested in specific bank holidays such as Easter. Unfortunately, the Easter weekend doesn't take place on the same days every year.

       

      I thought I could build two parameters. The first one enables the user to select the bank holiday they're interested in and the second one would include the current year. I created a calculated field to return the period between 14/04/2017 and 17/04/2017 (which returns nothing when set to true...):

       

      IF [Bank Holidays]="Easter Weekend" AND [Year]="2017"

      THEN [Order Date]>=DATE("14-04-2017") AND [Order Date]<=DATE("17-04-2017")

      END

       

      My first question is how do I get the calculation to work so it returns my Easter weekend for the current year and the sales for that weekend and how can I set up another calculation that always returns the Easter weekend of the previous year (25/03/2016 - 28/03/2016 in this case)?