title: Power BI Average Per Week
body: <p>I need to calculate the average customer volume per week. I have my measures set up as:</p>
  <pre><code>Total Volume = COUNT ( Table[LoadNumber] )
  
  Total Weeks = DISTINCTCOUNT ( Table[Weeks] )
  
  Average Volume = DIVIDE ( [Total Volume], [Total Weeks] )
  </code></pre>
  <p>However, not all customers have volume for every given week. This is a problem because I want total weeks to be constant and not relative to the actual weeks a customer had volume.</p>
  <p>For example, if customer A moved 16 loads over the past 8 weeks and actually moved loads during each of those 8 weeks, the calculation will be 16/8 = 2 loads a week.</p>
  <p>If customer B moved 16 loads over the past 8 weeks and actually only moved loads during 4 of those weeks, the calculation will be 16/4 = 4 loads a week. For my purposes, this does not make sense and I need customer B to also have moved 2 loads a week.</p>
  <p>Is what I'm trying to achieve possible with DAX? I am rather new to Power BI and have spent many hours searching for an answer on this already. Thanks in advance.</p>