In all_routes.shp: length_m: $length * 100 * 1000 length_km: $length * 100 Then generate distances: Name: if ( "distance" > 0, if ( "distance" = round( "distance", 2 ), "distance" * 100, 'Finish' ), 'Start' )