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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
imallears
Contributor
Contributor

Dynamic changing calculation in straight table.xlsx

Hi,

I need help with hopefully is a simple problem.

I've attached a simplified image belowof the problem I'm having.

I want my total from the first row to then be to the Start Qty of row 2 then the total for row 2 to be the Start Qty for row 3 and so on.

I'm grouping by Start Date & Material #

Dynamic changing calculation in straight table.PNG

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Here is the solution.

Data:

LOAD Date(Date#(StartDate,'DD/MM/YYYY')) as StartDate,Material,StartQty,BuildPlan Inline [

StartDate,Material,StartQty,BuildPlan

14/07/2017,ABC,200,20

15/07/2017,ABC,200,40

16/07/2017,ABC,200,50

17/07/2017,ABC,200,30

];

Final:

Load StartDate as StartDate1 ,Material as Material1,BuildPlan as BuildPlan1,

If(RowNo() = 1,StartQty,Peek(Total)) as StartQty1,

If(RowNo() = 1,StartQty-BuildPlan,Peek(Total)-BuildPlan) as Total

Resident Data order by StartDate ASC;

Regards,

Kaushik Solanki

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

Is this exactly how your data is? or are you evaluating QTY and build plan in the straight table?

Please post a sample app

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.