How to show metrics value for traling 13 weeks

examples, for week 32i want show aggregacted values from week 20 to week 32 and for 33 from 21 to 33 and so on

Have you looked into windowSum?

Yes ,I am able to get it for trailing weeks metrics…what if I want to show for months now,

You might need to make a new dataset grouped to months because it’s not able to group rows with a windowsum.