Forum Discussion
Compare easter or holiday sales
Hi all,
Is it possible to compare easter or holiday sales over the years? For example easter this year is on the 4th of April 2021, last year it was on the 12th of April 2020. Next year easter will be on 17th of April 2022. The dates will be different over the years, but I still want to compare them between each other and how the dates on easter perform.
If possible I want this also for holidays, which contain a start and end date. These dates also differs between the years.
I have a regular date table, also a sales table which contains a date column and has a relationship with the date table. Next to that I have a holiday/event table which contain the following:
| Event / Holiday | Start date | End date |
If you need more information please let me know.
5 Replies
- AnonymousNot applicable
amitchandak , I have seen those but they don't work in my case.
- amitchandak
Super User
Anonymous , Create a new column in date table
Easter Day = if([DAte] = date(1900,1,1) + ROUND ( DATE ( year([date]), 4, 1 ) / 7 + MOD ( 19 * MOD ( year([date]), 19 ) - 7, 30 ) * 0.14, 0 ) * 7 - 8,1,0)You can use that as filter to compare
example
This Year = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year Rank]=max('Date'[Year Rank]) && 'Date'[Easter day] =1 ))
Last Year = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year Rank]=max('Date'[Year Rank])-1 && 'Date'[Easter day] =1 ))
- AnonymousNot applicable
Hi Anonymous ,
Sorry for that the information you have provided is not making the problem clear to me.
please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Best Regards,
Eyelyn Qin