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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
george456
Creator
Creator

Forward Stock Cover Calculation

Dear Community

I have a situation that requires some help. I have to calculate Forward stock cover. The basic calc will be like this:

Sum ( Units) month + Average of three months Units into future

i.e Closing Stock of Month ( Dec2019) / Average of Units (Forecasted Jan 2020, Feb 2020 , March 2020)

I am looking forward to your reply

 

Regards

2 Replies
Anil_Babu_Samineni
MVP
MVP

Perhaps this?

if(Month<=MonthName(Today()),sum({<Month={"=MonthName(Today())"} Units)
,linest_m(total aggr(if(sum(Units),sum(Units)),Month),Month)*Month
+linest_b(total aggr(if(sum(Units),sum(Units)),Month),Month))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
george456
Creator
Creator
Author

Hi

 

Thanks for the reply. I however am not to familiar with this syntax. Let me try and will revert soonest

 

Regards