1 Reply Latest reply on May 8, 2018 3:13 PM by Michel Caissie

    Issue while using ranking at lower granularity and categorizing the Pie slices at higher granularity

    abhishek dh

      Hello All,

      I have a specific client requirement which I am trying to replicate using Sample Superstore data as follows :

      - We need to show 2 doughnuts in the dashboard for Top 2 categories having highest sale

      - For each category doughnut , we need to have slices of subcategories showing only 3 slices like Top 2 subcategories for that particular Category and remaining subcategories of respective Category , should be clubbed in the third slice as 'Other'

      - All other dimension filters should work appropriately on these doughnuts.

       

      I tried to implement it using Index and Rank_unique functions. But as I need to rank subcategories in the doughnut,I need to use that dimension in the Detail marks card as Rank Subcategory table calculation would be computed using Category and subcategory dimensions but Subcategory dimension is not used in the view. The dimension used in the view is Subcategory grouping having only 3 dimension members .

      But actually it is creating slices of the doughnut depending on the Subcategory dimension which is on Detail marks card so there are actually four slices  in the doughnut . I need to show Label or Tooltip of the doughnut for only 3 Slices ie Chairs ,Tables abd Other. But it is giving two seperate slices  for Other Subcategory which I need to club in only one slice.

       

      I have attached screenshot and workbook as well. Kindly let me know if there is any work aound for this requirement.

       

      Thanks in advance !

       

      Abhishek

        • 1. Re: Issue while using ranking at lower granularity and categorizing the Pie slices at higher granularity
          Michel Caissie

          Abhishek,

           

          Check in the attached if this would be a viable solution.

          The goal here is to show null values for ranks higher than 3.

           

          So for the Labels,

          Rank Sub Category becomes

          if [Rank Sub Category] <=3 then [Rank Sub Category] end

           

          SubCategoryGrouping becomes

          if [Rank Sub Category]<=2 then attr([Subcategory1])

          elseif [Rank Sub Category] = 3 then 'Other'

          end

           

          and Sales becomes

          if [Rank Sub Category]<=2 then SUM( Sales )

          elseif [Rank Sub Category] = 3 then WINDOW_SUM( [Sales (other)] )

          end

           

          where Sales(other) is

          if [Rank Sub Category]<=2 then 0

          else SUM( Sales )

          end

           

          I also place the SUM(Sales) on the Angle to get the right slice size.

          One drawback is that you cannot place the label in the center of the red slice , and also the tooltip still shows  two different slice in the Other zone.

           

          Michel