Forum Discussion
Rolling 13 weeks back into a previous year
I am trying to get the previous 13 weeks data to show up on a report and I can only get the previous years data to pull wihout it pulling this years weeks that are included in the time frame.
So far I have used this, but it only returns last years weeks and not both years.
IF(SY_CLRHSE[Current Week Num]<14,OR(IF(AND(SY_CLRHSE[Report Year]=YEAR(TODAY())-1,SY_CLRHSE[Report Week]>=SY_CLRHSE[LY Last Weeknum]-SY_CLRHSE[13 Week Rolling]),1,0),IF(AND(YEAR(TODAY())=SY_CLRHSE[Report Year],SY_CLRHSE[Report Week]<SY_CLRHSE[Current Week Num]),1,0)),IF(AND(SY_CLRHSE[Report Week]>=(SY_CLRHSE[Current Week Num]-13),SY_CLRHSE[Report Week]<SY_CLRHSE[Current Week Num]),1,0))
Current Week Num =""
report week = week data is from
13 week rolling = 13-current week num (this is to get how many weeks i need to subtract from the previous week)
report year = ""
Basically I want to see using a line graph
/-------------
/---------------\ /
----------------/ \---------------/
week 41-2017, week 42-2017, .....week 52-2017, week 1-2018
I am trying to get it to add week 1+ for 2018 moving foward
2 Replies
- trentchecketts1Frequent Visitor
I am trying to get it to add week 1+ for 2018 moving foward
- v-yulgu-msft
Microsoft Employee
Hi trentchecketts1,
I would suggest you use a relative date slicer to filter previous 13 weeks data. Please add a [date] field into slicer. Change the slicer type to "Relative".
Best regards,
Yuliana Gu