title: How to calculate average for the calendar year
body: <p>My <a href="https://i.stack.imgur.com/ylunP.png" rel="nofollow noreferrer">input file</a> consists of column <code>Actual Exp</code> and <code>Actual Min</code>.</p>
  <p>Now I want to create a measure for calculating the average for the current calendar year having the latest month of data for <code>Actual Exp</code> and <code>Actual Min</code>.</p>
  <p>I want to calculate the average from Jan'21 to Mar'21, and later if data gets added for Apr or May I would like to calculate the average from Jan'21 to May'21 or Apr'21.</p>
  <p>Similarly, I want to have from Jan '21 to Dec'21 in Dec'21 and an average from Jan'22 to Feb'22 in Feb'22. I also have a <code>date</code> filter I don't want my date filter to affect the average.</p>
  <p>I tried using <code>TOTALYTD</code> and <code>MAX(Date)</code>, but it's not working.</p>
  <p>Thanks.</p>