Forum Discussion

Sidpug2013's avatar
Sidpug2013
Frequent Visitor
2 years ago
Solved

Compare Easter Weeks every Year

Hi!

I have Sales Table and Date Table (with holidays until 2050).

 

I wish to calculate and compare sales about:
- Previous week of Easter Week

- Easter Week

- Following Week of Easter Week

 

Every Year the Easter Weeks changes, and i don't know as to do. The comparison needs to be done with the previous year.


Thanks in advance

  • lbendlin's avatar
    lbendlin
    2 years ago

    In your Date table you have a flag "Easter week"  for each participating day.  In your DAX use that flag as an additional filter when you do the year-over-year comparisons.

3 Replies

  • In your Date table mark the Easter week for each of your years.  This data is immutable, there is not good reason to try and calculate it over and over again.

  • Sidpug2013's avatar
    Sidpug2013
    Frequent Visitor

    I must compare sales about:

    - Previous week of Easter Week

    - Easter Week

    - Following Week of Easter Week

    How can i do with Dax?

    • lbendlin's avatar
      lbendlin
      Super User

      In your Date table you have a flag "Easter week"  for each participating day.  In your DAX use that flag as an additional filter when you do the year-over-year comparisons.