Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

jash
New 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.

MarketSep-18Oct-18Nov-18Dec-18Jan-19Feb-19Mar-19Apr-19May-19Jun-19Jul-19Aug-19
Benelux201020102010201010301020

 

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

MarketSep-18Oct-18Nov-18Dec-18Jan-19Feb-19Mar-19Apr-19May-19Jun-19Jul-19Aug-19
Benelux20102010209090908010090100
3 Replies
Partner
Partner

Re: How to add last 6 months rolling data in month wise

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
Partner
Partner

Re: How to add last 6 months rolling data in month wise

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

Re: How to add last 6 months rolling data in month wise

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

Regards,
Brett

To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.