Skip to main content
added 519 characters in body
Source Link
Babel
  • 74.9k
  • 15
  • 87
  • 227

Simply add aggregate( @layer, 'sum', [your expression] ) and replace [your expression] with the expression you provided.

So the whole expression will look like, where apart from the first three and the last line, it is the expression you first provided (be sure the syntax is correct, include all single quotes '):

aggregate( 
    @layer, 
    'sum', 
    length (
        transform (
            make_line (
                geometry ( 
                    get_feature_by_id ( 
                        @layer, 
                        $id 
                    )
                ), 
                geometry ( 
                    get_feature_by_id ( 
                        @layer, 
                        $id+1 
                    )
                )
            ),
            'EPSG:4326', 
            'EPSG:23033'
        )
    )
)

Simply add aggregate( @layer, 'sum', [your expression] ) and replace [your expression] with the expression you provided.

Simply add aggregate( @layer, 'sum', [your expression] ) and replace [your expression] with the expression you provided.

So the whole expression will look like, where apart from the first three and the last line, it is the expression you first provided (be sure the syntax is correct, include all single quotes '):

aggregate( 
    @layer, 
    'sum', 
    length (
        transform (
            make_line (
                geometry ( 
                    get_feature_by_id ( 
                        @layer, 
                        $id 
                    )
                ), 
                geometry ( 
                    get_feature_by_id ( 
                        @layer, 
                        $id+1 
                    )
                )
            ),
            'EPSG:4326', 
            'EPSG:23033'
        )
    )
)
Source Link
Babel
  • 74.9k
  • 15
  • 87
  • 227

Simply add aggregate( @layer, 'sum', [your expression] ) and replace [your expression] with the expression you provided.