title: power bi: different calculations for several rows
body: <p>Would you, please, help me to apply different calculations for 2 rows in power BI:</p>
  <p>that is, to transform this table:</p>
  <pre><code>client_ids products purchased month
  1          0        0         jan
  2          1A       1         jan
  2          1B       1         jan
  3          0        0         jan
  4          0        0         jan
  5          0        0         feb
  </code></pre>
  <p>into this:</p>
  <pre><code>purchased jan feb
  1         1   
  0         3   1
  </code></pre>
  <p>That is, to perform calculations:</p>
  <p>-on purchased = 0 - count over month, client</p>
  <p>-on purchased = 1 - count distinct over month, client</p>
  <p>Thank you.</p>
  <p>I used the method:</p>
  <p>-create the reference to the main query in the query editor</p>
  <p>-drop the column with products</p>
  <p>-drop duplicates</p>
  <p>But this makes downloading the report slower.</p>