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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

A problem in accessing previous data to calculate recent 1 .

Hello Everyone ,

I am creating a forecast table where my table is looking as :

ForecastTable.png

In this table my dimension and expression is as follows:

Dimension :- ForecastStock

Expressions are :-

1)=sum(PlannedProduction)

2)=sum(PlannedRecieves)

3)=sum(ActualProduction)

4)=sum(ActualRecieves)

5)=week(DateOfForecast)

6)=if(Week(DateOfForecast)=1,sum({<ProductId={'1'}>}InitialStock)+PlannedProduction+PlannedRecieves-ForecastStock,0)

Now the question is in 6th expression where i need to calculate in else part instead of 0, the calculation is based on my previous week calculation in this expression itself.

Eg:

for week 1 i an using the value of initialStock which is present in my database but for week 2 my initialStock will be replaced by the Calculated value for week 1,

Similarly week 3 will use the value of week 2 in calculation... and goes on.

How can i pick the previous weeks value for next week where my expression for calculation is same for every week.

Please Help.

Thanks in Advance.

I am attaching my file with this:

0 Replies