I would like to create a river system with water flow based on the following attribute table:
The river system is divided in different segments (the ID to every Segment is called "SegmentNo"). The column "Downstream" shows the ID from the next downstream segment. Not every segment have a water flow value. Only these segments with a waste water treatment plant (WWTP) in his environment. Now I would like to compute the water flow for each segment in downstream direction with the field calculator. Unfortunately I am not a hero in Python, so I can't create new functions. Probably it isn't necessary too. I have found a "When Then" solution which add up the water flow. But not in combination with the downstream segments. Because not every segment have only one neighbour. Can I solve the problem with the given functions?