1 Reply Latest reply on Oct 14, 2016 7:43 AM by Simon Runc

    Showing top 10 and non top 10 together in the same pie chart as  a Percent of Total

    ameya v

      Hi Everyone, I have a query which needs to be resolved. I have to take top 10 of a certain dimension and also group the others that are not in the Top 10. This needs to be shown in pie chart. Suppose the Top 10 contribute to 70 % of the total sales. so the ones not in the top 10 would contribute 30 % . So my pie chart will have 11 members. the Top 10 Members and the 11th would be the group of members that do not fall under the top 10.


      I am attaching the sample store workbook , where I am trying to show to top 10 in terms of sales . also ill like to add an 11th member which would show how much the non top 10 members contribute

        • 1. Re: Showing top 10 and non top 10 together in the same pie chart as  a Percent of Total
          Simon Runc

          hi Ameya,


          One way to this is to use sets (this is the simplest as it doesn't require Sub-Category in the VizLoD in order to calculate the Top 10).


          So first I create a set from Sub-Cat


          Then I set up the set as follows


          Once we have this, I can create the following calc

          [Top 10 or Rest]

          IIF([Top 10 SubCats],[Sub-Category],"Rest")


          and then use this as my colouring in the Pie. I've also added a [Top 10 or Rest - Sorting] calc (very similar to the above one), so the "Rest" appears last in the Pie when I sort it.


          One other thing to note (like FIXED LoDs) due to the "Order of Operations" sets are calculated before any "regular" filters are applied. As such if you want the top 10 to be responsive to filtering (say by selecting just a single year) you need to make this a context filter (this bumps it up the calculation pipeline)


          Hope that helps, and makes sense, but let me know if not.

          2 of 2 people found this helpful