title: How to calculate Weighted Average in Power BI using DAX?
body: <p>My data table looks like this:</p>
  <pre><code>Country | Total | Days 
  A | 56 | 3
  B | 23  | 5
  C | 22 | 2
  D | 90 | BLANK
  </code></pre>
  <p>I want to find the weighted average which consists of 4 steps</p>
  <pre><code>Step 1 : Multiply Total into Days where Days is not blank (i.e to consider only non blank values). lets name the new column formed &quot;Product:
  Step 2 : Take the Subtotal sum of the PRODUCT
  Step 3 : Take the Subtotal sum of TOTAL
  Step 4 : Step 2 / Step 3
  </code></pre>
  <p>I am unable to do this in Power BI even though it is done on the EXCEL.
  Can someone please help me out?</p>