Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
trentchecketts1
Frequent Visitor

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

1 ACCEPTED SOLUTION
trentchecketts1
Frequent Visitor

I am trying to get it to add week 1+ for 2018 moving foward

Rolling week.JPG

View solution in original post

2 REPLIES 2
v-yulgu-msft
Employee
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".

1.PNG2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
trentchecketts1
Frequent Visitor

I am trying to get it to add week 1+ for 2018 moving foward

Rolling week.JPG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.