Table Chart Average Row

Options

Is it possible to have the last row of a table be the average of all values in the respective column? I see options for Totals & Subtotals, but am not seeing a way to make these an Average instead of a Total.

Thanks!

Best Answers

  • MichelleH
    MichelleH Coach
    Answer ✓
    Options

    @PJG Yes, you would still use the Totals option but set the Aggregation for that column to Average instead of Sum.

  • marcel_luthi
    marcel_luthi Coach
    Answer ✓
    Options

    @PJG just keep in mind that it'll set that aggregation at all levels, not only for the total/subtotal. Up to a certain point if different aggregation levels are needed, you'll need to define a Beast Mode to achieve that. Example, if you are showing total sales by user (SUM), but want the Total of the table to be the average of those total sales. In that case you'd create a Beast Mode that looks something along the lines of:

    AVG(SUM(`sales`)) OVER (PARTITION BY `user`)
    

Answers

  • MichelleH
    MichelleH Coach
    Answer ✓
    Options

    @PJG Yes, you would still use the Totals option but set the Aggregation for that column to Average instead of Sum.

  • PJG
    Options

    Perfect, thank you!

  • marcel_luthi
    marcel_luthi Coach
    Answer ✓
    Options

    @PJG just keep in mind that it'll set that aggregation at all levels, not only for the total/subtotal. Up to a certain point if different aggregation levels are needed, you'll need to define a Beast Mode to achieve that. Example, if you are showing total sales by user (SUM), but want the Total of the table to be the average of those total sales. In that case you'd create a Beast Mode that looks something along the lines of:

    AVG(SUM(`sales`)) OVER (PARTITION BY `user`)