1 2 Previous Next 18 Replies Latest reply on Oct 23, 2014 4:41 AM by matthieu.degroot Go to original post
      • 15. Re: Group customers based on order behaviour

        Exactly the same that is done in the Groups tab, but than with relative numbers instead of absolute:



        • 16. Re: Group customers based on order behaviour
          Matt Lutton

          OK, that's what I expected but thanks for confirming.  I will see what I can find out.

          • 17. Re: Group customers based on order behaviour
            Matt Lutton

            This is a good example of evaluating all of our requirements prior to choosing a path to a solution in Tableau -- or a good example of once a certain level of complexity is added to our requirements, we may need to consider moving toward another route.  Sets can make your life easier here.


            In this example, if we replicate the Groupings by using a Set for each Group type, then create a calculated field to return a Dimension for the Set groupings, the result is that a simple percent of total Table calc can be evaluated against the resulting Dimension.


            So, create 3 sets: one for each grouping.  To do this, right click the [ID] field to create your sets at that level of granularity.  Choose the "Condition" tab and use conditions like those shown below:

            Group 1 Set: [# Sample]==0 AND SUM([# Finalorder])==1

            Group 2 Set: [# Sample]>0 AND SUM([# Finalorder])==1

            Group 3 Set: [# Sample]>0 AND SUM([# Finalorder])==0


            From there, we can create a Dimension for the final Groupings, using a calc like:

            IF [Group 1 Set] THEN 'Group 1'

            ELSEIF [Group 2 Set] THEN 'Group 2'

            ELSEIF [Group 3 Set] THEN 'Group 3'



            From there, simply pull that Dimension into the view, and use a Percent of Total on a CNTD(ID) pill to return the results you want.  This technique is similar to #4 at the Slicing by Aggregate link I've referred to several times: Slicing by Aggregate | VizPainter


            I'm going to let you try and apply this on your own -- if you have trouble, post your TWBX or let's jump on a screenshare and work this out together.


            Percent of Total on Gropuings.png

            1 of 1 people found this helpful
            • 18. Re: Group customers based on order behaviour

              Yea that seems to work as well! Thanks again Matt Lutton!

              1 2 Previous Next