running total

BULBULISLAM89_0-1654525449765.png

BULBULISLAM89_1-1654525659675.png

hello there, 

as you can see in my sheet i have data for different sections, lines, hours wise. i want to make a running total column automated by AppSheet so that if a section, line matches it will make the running total for particular hourly data, for example, assembly, line 1, hour 1st = 350, hour 2nd = 700( suppose 2nd-hour entry is 350) and so on for rest of the hours.  I have created a table where I can filter data but can't do the running total. my code is 

SUM(
SELECT(
master_file[Actual Out Put],
AND(
[Date Time]=[_THISROW].[Date Time],
[Section]=[_THISROW].[Section],
[Line]=[_THISROW].[Line],
[Hour No]=[_THISROW].[Hour No]

)

)
)

any suggestion will be appreciated 

Solved Solved
0 6 271
1 ACCEPTED SOLUTION

Why would you want to update the running total backwards? Each record will contain the running total at the time of its creation, while older records indicate the old totals at that moment. 

The behavior is as expected, since formulas in normal columns do not recalculate for a given row, unless this row is edited or there has been a data change in any column in the same row.  

If you really want to update the running total in all rows then you'll have to use a virtual column instead of a normal one. Virtual columns recalculate with every sync. However, as the dataset grows in size, you'd face performance issues and increasingly longer sync times. 

 

View solution in original post

6 REPLIES 6

Welcome to the community!

What is the problem with this code? what does it give you?

BULBULISLAM89_0-1654535157223.png

as you can see for assembly section line 1 , 1st hour user entry data is 343 , also 2nd hour user entry is 343,  my mentioned code above gives me the same value what user inputs in hourly output as well ; but i need 686 for 2nd hour in hourly output column .

thanks for query, Mr @Joseph_Seddik 

You can change your Hour No column type to Number so it contains 1, 2, 3 instead of 1st, 2nd, 3rd, then in your expression, change the Hour No restriction to:

[Hour No] <= [_THISROW].[Hour No]

BULBULISLAM89_1-1654624792113.png

dear Mr @Joseph_Seddik the expression result is what I want but my column values in the running total column are not the same, for the first hour it is showing 0, and the total sum till the 3rd hour is not the same;  can you please suggest how to solve this issue 

 

Why would you want to update the running total backwards? Each record will contain the running total at the time of its creation, while older records indicate the old totals at that moment. 

The behavior is as expected, since formulas in normal columns do not recalculate for a given row, unless this row is edited or there has been a data change in any column in the same row.  

If you really want to update the running total in all rows then you'll have to use a virtual column instead of a normal one. Virtual columns recalculate with every sync. However, as the dataset grows in size, you'd face performance issues and increasingly longer sync times. 

 

thank you MR @Joseph_Seddik . IT IS SOLVED USING THE LATEST COLUMN WHERE THE VALUES ARE STORING 

Top Labels in this Space