I'm trying to get the cumulative sum of the column "uren_duur"
in a new column "uren_tot"
based on the recorded water height "NUMERIEKEWAARDE"
. The water height ranges from -194 to 262 and since this I'm trying to figure out the total time each water height has been submerged over a 3 month period. The column "uren_duur"
contains the time submerged per water height.
So for the top row ("NUMERIEKWAARDE" = 262) the cumulative sum should be 0,166.. Then for "NUMERIEKWAARDE" = 261 the cumulative sum should be 0,166..+ 0,166.. = 0,333, 257 should then be 0,166..+ 0,166..+ 0,166.. = 0,4999 and so on...
So when the height is -194 this should likely be around 2100 hours cumulative sum. I tried using this post (Add cumulative sum column to attribute table) as you can see in the expression bar but it wouldn't work for me.
This step is so easy to do in excel by just filling the first value (i.e. C1 = 1) and then using B2 + C1 to calculate C2 and just dragging the formula down. But I'm trying to automize a process in a small model so I don't want to perform this step manually.
calulated_a28a...
instead ofuren_duur
(layer)) and another field (NUMERIEKWAARDE
instead ofuren_duur
(attribute))