Calculating the average across an entire table

Hi everyone,

I’m trying to use the table calculation “avgOver” to calculate the average across all vendors for a particular metric in a table.

For reference, these are the columns of the table.

Vendor, per unit spend.

I basically want to create a new column that calculates the average “per unit spend” across all the vendors. Which means that for this column, all the rows would have the same value for this column.

I tried using “avgOver” with PRE AGG, but it didn’t work. This is how I did it:

avgOver({per_unit_spend},[{vendor_name}], PRE_AGG)

it shows different values for each row.

Any help would be much appreciated, thank you!

Hi @Patrick1,

Your calculated field is calculating the average for each vendor. It should show the same value in all rows that have the same vendor.

If you want to calculate the average across all vendors, try this:

avgOver({per_unit_spend}, [], PRE_AGG)
1 Like