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

Announcements
Discover how organizations are unlocking new revenue streams: Watch 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
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Can you give output data from the sample data which you have given, so that it will help to understand it better.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
agni_gold
Specialist III
Specialist III
Author

Hi friends,

Required output i have attached. please help

agni_gold
Specialist III
Specialist III
Author

Hi Friend,

Attached required output with logic i want.

agni_gold
Specialist III
Specialist III
Author

tresesco‌ can you please help here.

agni_gold
Specialist III
Specialist III
Author

gwassenaar‌ can you please help here ?

Anonymous
Not applicable

Hi Agnivesh,

Please find the attached qvw and let me know if this is what something you are looking for.

Thanks

Mouna Chandra

agni_gold
Specialist III
Specialist III
Author

thanks bro , but this is not matching with my desired result as i attached.

Anonymous
Not applicable

What i did was i have taken right(YearMonth,3) as version and did group by on version to sum all the forecast values groupby version.

Is this logic correct?  you said you want to sum previson three months to get forcast for latest month right.

agni_gold
Specialist III
Specialist III
Author

sum previous three months to get the forecast for the latest month right.



Correct logic:

sum previous three months of Version-3 will be my current month forecast.