Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
scott_simmons
Partner - Contributor
Partner - Contributor

How to get a rolling 30 day average for the last 30 day

I'm trying to create a graph that shows a rolling 30 day value over the last 30 days for # of orders and $ amount of orders. 

In my example, they want to do a 30 day rolling aggregation of order count and order $ over the past 30 days and I don’t know how to put that together in a formula/set logic.  So you would only have 30 days on your chart and for each of those days it would show the sum/count of 30 days prior to that date.

So for example,  for 03/17/20 , I would want count ( distinct order) where date between 2/17/20  and 3/17/20

                                for 03/16/20, I would want count ( distinct order) where date between 2/16/20  and 3/16/20

                                for 03/15/20, I would want count ( distinct order) where date between 2/15/20  and 3/15/20

                                .

                                .

                                .

                                for 02/17/20, I would want count ( distinct order) where date between 2/17/20  and 1/18/20

               

1 Reply
Brett_Bleess
Former Employee
Former Employee

Have a look at the following Design Blog post:

https://community.qlik.com/t5/Qlik-Design-Blog/Accumulations/ba-p/1466581

There are some further links in that post to other posts that may be helpful too.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.