title: How to calculate average inventory in power bi?
body: <p>I would like to calculate average inventory as per month. I have used date filter in the report.</p>
  <p>We have average inventory formula as (beginning inventory + closing inventory)/2</p>
  <p>I have following logic to calculate average inventory.
  If we choose month as a march then the amount of the beginning inventory will be the inventory of the march and the amount of the closing inventory will be the inventory of the the last month and we need to sum these beginning and closing inventory and then take averages of them.</p>
  <p>So how can we write above logic in DAX expression?</p>
  <p>I have attached the data with expected output.</p>
  <p><a href="https://i.stack.imgur.com/ImlkF.jpg" rel="nofollow noreferrer">Please click on this link to see the data with the expected output.</a></p>