Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
shamitshah
Partner - Creator
Partner - Creator

Aggregation and Moving Average

Hi,

I have the following table and require an expression to calculate the 30 day moving average and the turn ratio at each date.

For example, with respect to 12 Feb 2016, the sum of the accumulated balances for the past 30 days (i.e. from 13 Jan 2016 - 12 Feb 2016) is 64,126. The average is 2,137 (64,126/30).

The turn ratio for 12 Feb 2016 would be (Opening balance +Purchases-Closing balance)/Average

=(2584+2-1815)/2137 = 0.36

Any ideas?

Thanks

Shamit

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Perhaps this document helps: Calculating rolling n-period totals, averages or other aggregations


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Perhaps this document helps: Calculating rolling n-period totals, averages or other aggregations


talk is cheap, supply exceeds demand
shamitshah
Partner - Creator
Partner - Creator
Author

Hi Gysbert,

The As of Table solution is perfect.

I am able to get the rolling balance and average.

Thanks

Shamit