# Weighted average function

How can i do weighted average function so that I got over two columns

Assuming you have two columns named `value` and `weight`, then you could calculate the weighted average as follows:

``````sum( value * weight)
/
sum(weight)
``````

Hi,

I want to calculate a weigthed average with correct time aggregation, and i try this, but doesn’t work (i have a error in quicksight).

Someone have already calculate a weighted average in Quicksight ? with correct aggregation ? Quicksight have few aggregate function :

Thx,
Sylvain

Ok,