3 Replies Latest reply on Mar 7, 2017 9:46 AM by Josh Weston

    How can i have the number of sames combination ?

    Sabrina OURIF

      Hello,

       

      On my view below, we have a column with "Order number" and one colour per references of spare parts on each order, and i need to know the number of same combinations.

      Please, how i can have this results, on the example, i need to know that we have 4 orders with 1 reference pink, 1 order with 1 red+1 green, etc ...

       

      Thank you for your help

        • 1. Re: How can i have the number of sames combination ?
          sesha.peram

          Hi,

           

          Take count of measure objects which captures  colours information.

           

          Thanks

          • 2. Re: How can i have the number of sames combination ?
            Sabrina OURIF

            Hi,

             

            thank you for your answer,

            i did it, but i don't have the results expected :

            i forgot something ?

            • 3. Re: How can i have the number of sames combination ?
              Josh Weston

              This is a solution, but may not be the best solution depending on your use case.

               

              1. The easiest solution would be if your data was in wide-format, where each reference color was its own column. That way you could concatenate your columns to create a composite of the combinations. This would allow you to aggregate properly.
              2. If you cannot get your data into wide-format, you can simulate wide-format. That is what I have done in the attached solution.

               

              I have recreated your issue:

               

              original.PNG

               

              I am then able to produce the following visualization, which shows the count for each combination:

               

              combinations.PNG

               

              This is pretty hacked together, but here are the basic steps:

               

              1) Create a calculated field for each of your colors. This is how we simulate wide-format.

              references.PNG

               

              2) Create a calculated field called "Combination". This is a level of detail expression that creates your unique combinations. I have gone to the [Order Number] of detail.

               

              combinations_calc.PNG

               

              3) Create a new sheet. Turn-off Aggregate Measures under the Analysis tools. When you drag combinations to the rows shelf, change it to Attribute. Drag Order Number to the detail shelf, and add it to the tooltip to see which order numbers make up the combination. When you drag combinations to the columns shelf, change it to be continuous.

               

              See attached Workbook for more information.

               

              Good luck!