title: How to count number or rows in in one column, group by values in another column in Power BI
body: <p>I have a table with two columns A, B.</p>
  
  <pre><code>Column A     Column B
  Fruit        Apple
  Fruit        Orange
  Fruit        Pear
  Veg          Beans
  Veg          Potato
  </code></pre>
  
  <p>I need to count the number of occurrences of column B for each distinct value in Column A</p>
  
  <pre><code>Required Result:
  Column A     Occurence
  Fruit        3
  Veg          2
  </code></pre>
  
  <p>Is there any function I can use in DAX to get the required result?</p>