Skip to main content

Add an average line to a chart

Use a calculated field to easily add an average line to your visual

M
Written by Mitra Abrahams
Updated this week

To add an average line to your chart (like the one in the example above), follow these steps:

  1. With your visual selected, go to the Custom tab in the design panel and click the β€˜+’ icon next to Marks to add a new mark.

  2. Set the mark type to Line.

  3. Drag the relevant field into the X axis column (e.g., Date).

  4. In the Y axis column, double-click to add a calculation. Enter the formula: AVG(Value) OVER ()

    (Replace "Value" with the field you want to calculate the average of.)

Click here to view the canvas with this example.

Did this answer your question?