Cost per mile by depot

Why ask this?

A fleet planner comparing routes needs cost per mile across all trips on a route. Trip mileage determines how much each trip contributes.

Start with the sample data

Open source.csv. In the first row of source.csv, Miles = 2, Depot = North, Cost = 4.01.

What to say

Show a bar chart of average cost per mile by depot. Divide total cost by total miles and skip rows with zero miles.

Processing time

Recorded audio to chart ready
4.93 s
Transcript to chart ready
0.44 ms

One local replay from recorded audio through transcription and native chart data preparation. Recording time and screen painting are excluded.

See the transcript in the composerRecorded transcript entered in the native composer

How the canvas produces the result

  1. CSV Input · Read the sample records

    source.csv supplies 3 rows. These records are the inputs to the next step.

  2. Measure Filter · Keep the requested rows

    The filter uses Miles > 0 in keep mode. 2 rows remain including 2.

  3. Aggregate · Sum Cost, Sum Miles for each Depot

    If a category appears more than once, its records contribute to one result. The first output row contains Depot = North, sum_Cost = 4.01, sum_Miles = 2.

  4. Math · Calculate Average cost per mile

    Apply [sum_Cost] / [sum_Miles] to each input row. Set Decimal places to 2 to round the result. The first row yields 2.01.

  5. Charts · Draw the bar chart

    Use Depot for the categories and Average cost per mile for the plotted values.

Native n0is canvas for Cost per mile by depot

The chart

Workflow result in n0is
DepotAverage cost per mile
North2.01
South4

How to use the result

For Depot North, the sample reports Average cost per mile of 2.01.

Synthetic test audio. Screenshots from the recorded workflow in n0is.