title: Power Query - Weighted average
body: <p>I have the following table on Power Query that contains a quantity of a product bought and his price:</p>
  
  <p><a href="https://i.stack.imgur.com/Wq2cB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wq2cB.png" alt="enter image description here"></a></p>
  
  <p>I want to create another third column with the current average purchase price, however, I need to consider the history and the average should be weighted:</p>
  
  <p><a href="https://i.stack.imgur.com/plect.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/plect.png" alt="enter image description here"></a> </p>
  
  <p>Can anyone help me?</p>