I have a line split into segments that I want to calculate the accumulative length for, like this:
I can achieve this easily on a smaller dataset with this inbuilt function in the field calculator in QGIS:
aggregate('layer', 'sum', "Length", "id"<=attribute(@parent, 'id'))
However, my dataset has hundreds of thousands of lines and this method is far too inefficient.
Is there a more effective way to achieve this?