Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna20
Specialist II
Specialist II

rolling month caluculation

Dear qlikview hunters,

I am facing issue with calculation

I am giving example with sample data

could you please provide me solution

ex

month,sales,inventory

sep-2015,300,200

oct-2015,200,150

nov-2015,300,200

dec-2015,500,250

jan-2016,500,300

feb-2016,650,520

mar-2016,700,500

apr-2016,650,250

may-2016,550,350

jun-2016,630,250

jul-2016,530,250

aug-2016,850,550

sep-2016,900,500

oct-2016,500,450

nov-2016,850,150

dec-2016,500,400

so on till sep-2018

now my requirement is if(month>=201601 then sales+inve-prev(inventory)

I have time periods like last 12 months,last 6 months,future 6 months

when I click last 12 months button mu period is sep-15 to aug -16 for this period I don't have any proble

for last 6 months is aug-2016 to mar-2016 my caluculation is    sales+inve-prev(inventory)

aug-2016 prev is july-2016

for july jun-2016 so on

but I don't have reference for the month of mar-2016 for prev month caluculation

please guide me

3 Replies
sunny_talwar

Is this something you need in the script or you need this to be done on the front end of the application? Also would you be able to provide the expected numbers based on the sample you have provided above?

Best,

Sunny

krishna20
Specialist II
Specialist II
Author

which one is better please suggest me

I need output for that where front end or back end

sunny_talwar

Does this need to be dynamic based on selections or is this something static? If it is dynamic then I would suggest part script/part front end using The As-Of Table‌. But if it needs to be completely static, then you can do it completely in the script.