title: Count of distinct values with several criteria
body: <p>I want to be able to count distinct values with several criteria. As presented here below on the screenshot, I would like to know, how many POs do I have per month depending on the PO type (service or material).</p>
  
  <p><strong><em>Initial data:</em></strong></p>
  
  <p><a href="https://i.stack.imgur.com/o75Lj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o75Lj.png" alt="enter image description here"></a></p>
  
  <p><strong><em>Desired result:</em></strong></p>
  
  <p><a href="https://i.stack.imgur.com/2RodG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2RodG.png" alt="enter image description here"></a></p>
  
  <p>All the data is in text format.The difficulty is that the initial data table will be updated every month (I will be adding lines), so the formula has to consider possible updates. Pivot table will not work for me.</p>