9 Replies Latest reply on May 16, 2018 9:44 PM by Chloe S

    Buckets wise sum for Products ( Rank | Index | Bins )

    Sumeet Bedekar

      Hi Tableau Lovers,

       

      I am looking for way to get the below output in Tableau.

       

      Expected Output

      (Values of Sales will not match, its just a for reference)

       

      Here, the moment I remove the Product name , I am  not getting the desired the output.

       

      I have used this 2 options. But since they are tableau calculation they are not working.


      Option 1 - Index

      INDEX()

       

      Option 1 - Naming

      IF  [Option 1 - Index]<=10 THEN "Top N"

      ELSE IF  [Option 1 - Index]>=11 and [Option 1 - Index]<=20 then "11-20"

      ELSE IF  [Option 1 - Index]>=21 and [Option 1 - Index]<=30 then "21-30"

      ELSE IF  [Option 1 - Index]>=31 and [Option 1 - Index]<=40 then "31-40"

      ELSE IF  [Option 1 - Index]>=41 and [Option 1 - Index]<=50 then "41-50"

       

       

      else  "Others" 

          end

              end

                  END

                      END

                          END

       

      Option 2 - Rank

      RANK_UNIQUE(sum([Sales]))

       

      Option 2  - Naming

      IF  [Option 2 - Rank]<=10 THEN "Top N"

      ELSE IF  [Option 2 - Rank]>=11 and [Option 2 - Rank]<=20 then "11-20"

      ELSE IF  [Option 2 - Rank]>=21 and [Option 2 - Rank]<=30 then "21-30"

      ELSE IF  [Option 2 - Rank]>=31 and [Option 2 - Rank]<=40 then "31-40"

      ELSE IF  [Option 2 - Rank]>=41 and [Option 2 - Rank]<=50 then "41-50"

       

       

      else  "Others" 

          end

              end

                  END

                      END

                          END

       

       

       

      Please let me know, how should i get it done.

       

      Regards,

      Sumeet