title: Power BI: TopN and All Other
body: <p>I have a data set that resembles the following:</p>
  
  <pre><code>Year    Location    Type    Amount
  2015    West        Apple   12
  2015    West        Pear    14
  2015    East        Apple   55
  2015    South       Orange  62
  2015    West        Orange  64
  2015    East        Banana  12
  2015    North       Banana  23
  2015    East        Peach   43
  2015    East        Apple   89
  2015    West        Banana  77
  2015    West        Orange  43
  2015    North       Apple   2
  </code></pre>
  
  <p>And I need it to be summarized to show TopN as well as all other in order to keep the grand total the same. Just filtering to show only the TopN reduces the grand total and will not work...</p>
  
  <p>The end result should look like this (n=3 in this example):</p>
  
  <pre><code>Type         Amount
  Orange       169
  Apple        158
  Banana       112
  All Other    57
  Grand Total  496
  </code></pre>
  
  <p>I've gotten as far as creating a new measure for total amount:</p>
  
  <pre><code>Total_Amount = Sum(data[Amount])
  </code></pre>
  
  <p>But I don't know whether to proceed with RankX or TopN and I haven't found a straightforward way in Power BI to not only show the TopN, but also group everything else that would fall into the All Other category.</p>