title: Power BI: Count rows of a table based on a criteria of another table
body: <p>I have a table resuming the list of apps by month and year like this:  </p>
  
  <pre><code>Table 1  
  App | Month | Year  
  A   |  1    |  2019  
  B   |  1    |  2019  
  C   |  1    |  2019  
  D   |  1    |  2019  
  E   |  1    |  2019  
  ...  
  etc  
  </code></pre>
  
  <p>And I have a table that contains the info of all the tickets of the company, including the App and the Month and Year, like this: </p>
  
  <pre><code>Table 2  
  IDTicket | App | Month | Year  
  44424    | B   | 1     | 2019  
  44425    | D   | 1     | 2019  
  44426    | B   | 1     | 2019  
  44427    | A   | 1     | 2019  
  44428    | E   | 1     | 2019  
  ...  
  etc
  </code></pre>
  
  <p>I need to add to the Table 1, a column that count the amount of tickets of Table 2 according to each app, month and year, like this:  </p>
  
  <pre><code>Table1  
  App | Month | Year  | CountOfTickets  
  A   |  1    |  2019 | 1  
  B   |  1    |  2019 | 2  
  C   |  1    |  2019 | 0  
  D   |  1    |  2019 | 1  
  E   |  1    |  2019 | 1  
  </code></pre>