I have a three point across x with five repeating rows with this attributes:
[ 2, 1, 1 ]
[ 1, 2, 2 ]
[ 1, 1, 1 ]
[ 2, 2, 2 ]
[ 4, 4, 4 ]
I want to calculate a new field which aggregates the rows, currently I have: array_min(array_agg( "collumn", group_by:="row" ))
This will compute this result:
[ 2, 1, 1 ] -> 1
[ 2, 2, 2 ] -> 2
[ 1, 1, 1 ] -> 1
[ 2, 2, 2 ] -> 2
[ 4, 4, 4 ] -> 4
What I'm aiming to do next is to do a conditional where if the row aggregates is lower than the previous row aggregates, use that lower value instead of the computed value.
[ 2, 1, 1 ] -> 1: OK
[ 2, 2, 2 ] -> 2: OK
[ 1, 1, 1 ] -> 1: Lower than previous, use previous
[ 2, 2, 2 ] -> 2: OK
[ 4, 4, 4 ] -> 4: OK
I'm constrained on only using QGIS field calculator. Temporary field is allowed. What are my options?