2 Replies Latest reply on Jun 22, 2018 9:05 AM by Paul Winiecki

    Divide Data into Groups based on a Rank (need the grouping variable to be a dimension)

    Paul Winiecki

      Hello All,

       

      I'm currently stumped on a Tableau version 10.5 task. I need to divide customers into 3 similar sized groups based on where they stand in number of dollars spent in relation to other customers. Three quirks: only the customers with Condition=1 will be divided into the groups, no two customers with Condition=1 can have the same rank (so it is OK if two customers with dollars spent=10 are in different groups), and it's OK if the groups are not exactly the same size.

       

      In my first attempt I ranked customers using RANK_UNIQUE and if condition=0 the customer received the rank of the last customer with Condition=1 before it. I then made a variable to divide customers into groups of Low, Medium, and High based on their rank. Since there are 10 customers with Condition=1 the groups are sized 3, 3, and 4. However, since it's a table calculation I'm not able to use the groups as a dimension. I have to be able to use the Groups as a dimension because I have to plot them as Groups using a bar chart. If anyone has any ideas on how to group the data even if you know of a completely different approach I would really appreciate it!Screen Shot 2018-06-19 at 12.41.36 PM.jpg

       

      Thanks,

      Paul