How would I grab trailing 3 months data?

Hi all,
The screenshot is an excel format, but how would I grab trailing -3 months data for any given month? Example Jan’21 data would be a combination of Oct-Dec’20 data.

Any guidance would be helpful in this case!

1 Like

@Naveed Naveed Hashmi Thoughts?

@lillie Lillie Thoughts?

Hi @Phillip_Le -

If you data is not sparse (doesn’t have months with no data) you can use windowSum - Amazon QuickSight

windowSum(sum(val),[dt ASC], 3, 0, [grp])-sum(val)

Result: