Hi
what formula to use for Weekday & Week end sales summing in the below table
|--Date---| |ThisYr| |LastYr|
1/1/2016 100 125
2/1/2016 200 225
3/1/2016 300 325
4/1/2016 400 425
5/1/2016 500 525
6/1/2016 600 625
7/1/2016 700 725
8/1/2016 800 825
9/1/2016 900 925
Pivot Table Report should be
------------|--ThisYr-------| |--- Last Yr-------|
WeekDay 3rd to 6th total 4th To 7th Tot
WeekEnd 7th To 9th total 8th+9th+3rd
Tot Week 3rd to 9th 3rd to 9th
i used the formula to get last year sales
SameDayLY:=if(weekday(SALES[DATE],1)<=6,
calculate(sum(SALES[SALESLY]),dateadd(SALES[DATE],+1,day)),
calculate(sum(SALES[SALESLY]),dateadd(SALES[DATE],-7,day))
,)
it returns error.
This table is connected to another table of
Date . WeekType
1/1/2016 WeekEnd
2/1/2016 WeekEnd
3/1/2016 WeekDay
4/1/2016 WeekDay
5/1/2016 WeekDay
6/1/2016 WeekDay
7/1/2016 WeekEnd
8/1/2016 WeekEnd
9/1/2016 WeekEnd
what formula to use to get the last year sales
what formula to use for Weekday & Week end sales summing in the below table
|--Date---| |ThisYr| |LastYr|
1/1/2016 100 125
2/1/2016 200 225
3/1/2016 300 325
4/1/2016 400 425
5/1/2016 500 525
6/1/2016 600 625
7/1/2016 700 725
8/1/2016 800 825
9/1/2016 900 925
Pivot Table Report should be
------------|--ThisYr-------| |--- Last Yr-------|
WeekDay 3rd to 6th total 4th To 7th Tot
WeekEnd 7th To 9th total 8th+9th+3rd
Tot Week 3rd to 9th 3rd to 9th
i used the formula to get last year sales
SameDayLY:=if(weekday(SALES[DATE],1)<=6,
calculate(sum(SALES[SALESLY]),dateadd(SALES[DATE],+1,day)),
calculate(sum(SALES[SALESLY]),dateadd(SALES[DATE],-7,day))
,)
it returns error.
This table is connected to another table of
Date . WeekType
1/1/2016 WeekEnd
2/1/2016 WeekEnd
3/1/2016 WeekDay
4/1/2016 WeekDay
5/1/2016 WeekDay
6/1/2016 WeekDay
7/1/2016 WeekEnd
8/1/2016 WeekEnd
9/1/2016 WeekEnd
what formula to use to get the last year sales