Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
agni_gold
Specialist III
Specialist III

Need Help on Logic Preparation

Hi Friends,

I have a situation:

I have data for forecasting, in which every month client is doing forecasting for 2 years, and on the same month they are giving a number called PlaningVersion  (Example if Planing is done in Feb 2016, then version no will be 602 (Year last digit + 2 digit of current month))

So I need to calculate Lag3 for my data,

so suppose if I am calculating Lag3 for Dec2017, means its planning version would be 712, so it will sum data for Nov2017+Oct2017+Sep2017 for Planing version 709, means 3 months back (version  709) whatever planning was done for Nov, Oct, Sep will be the Lag3 for Dec2017 (version 712)

Hope I have explained correctly, But this thing I need to do at script level,

Also attaching sample data

11 Replies
Anonymous
Not applicable

I am sorry i am not able to understand. Is doing group by clause on version to get sum of forcast is correct logic, after that we can do sum of previous three months.

agni_gold
Specialist III
Specialist III
Author

I am giving one example here

707Jul-17241.9525005(Sum of Jun2017+May2017+Apr2017 of Planning Version 704

Hope you will understand.