Help needed with WindowAvg , where trailing week should not include the current week

Hey Guys ! Im not able to figure this out , basically i need to find a trailing 13 week average but excluding the current week which its calculating for for ex -

Any help from the team is appreciated

Hi
Referring to below screen shot you just need to adjust the start and end index.

1 Like

Hello Shahid,
I tried different combinations of start and end index
For ex ’ (reporting_week ASC) 13,0
What ever combinations I’ve tried it has always included the current row when I put the field in the pivot table

Hi
have you tried For ex ’ (reporting_week ASC) 13,-1 or similar like this?

Pretty sure it doesn’t accept negative values

Hi

Sorry for being late replying.
Using this approach you can get your desired result.

image

Hi @s4doto

It’s been a while since we last heard from you, did you have any additional or follow up questions regarding your initial topic? Were you able to try out the last approach that was shared?

If we do not hear back within the next 3 business days, I’ll go ahead and mark the solution to close out the topic.

Thank you!

Hi @s4doto

Since we have not heard back from you, I’ll go ahead and close this topic. However, if you have any additional questions, feel free to create a new topic in the community and link this discussion for relevant information.

Thank you!