Cost per unit by line

Why ask this?

A buyer comparing plant costs needs a per-unit figure that reflects actual volume. A small expensive batch should contribute only its share of units.

Start with the sample data

Open source.csv. In the first row of source.csv, Line = A, Units = 2, Cost = 4.

What to say

Create a bar chart of average cost per unit by line. Divide total cost by total units and skip rows with zero units.

Processing time

Recorded audio to chart ready
5.06 s
Transcript to chart ready
0.95 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 Units > 0 in keep mode. 3 rows remain including A.

  3. Aggregate · Sum Cost, Sum Units for each Line

    If a category appears more than once, its records contribute to one result. The first output row contains Line = A, sum_Cost = 20, sum_Units = 5.

  4. Math · Calculate Average cost per unit

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

  5. Charts · Draw the bar chart

    Use Line for the categories and Average cost per unit for the plotted values.

Native n0is canvas for Cost per unit by line

The chart

Workflow result in n0is
LineAverage cost per unit
A4
B0.75

How to use the result

For Line A, the sample reports Average cost per unit of 4.

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