Qlik Community

Ask a Question

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

How to add last 6 months rolling data in month wise

Hi ,

Could you please any one guide me how to add last 12 months rolling data in month wise.

we have data 2016 to 2019 August

Dimension:- Market and Year_Month

Measure- Sales

This first table we are showing last 12 months data Month wise.



So in 2nd Table we want to show Aug-2019 data should be addition of last 6 months data from 1st table.

same way other months data should be last 6 months data(That's highlighted in bold)

Right now i provided sample data only

3 Replies

Try something like this

sum( aggr( rangesum( above( total sum( {<Year=, Month=, Year_Month=>} Sales),0,6)),[Year_Month]))

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

An alternative to my previous suggestion is to look into the as of table. With the as of table your expression gets simpler, you don't need to bother with all the rangesums and aggrs.

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Digital Support
Digital Support

See duplicate post too: https://community.qlik.com/t5/QlikView-App-Development/How-to-add-last-6-months-rolling-data-in-mont...


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.