4 Replies Latest reply on Aug 8, 2018 1:44 PM by Nicole Anderson

    Show which dimensions overlap groups

    Nicole Anderson

      Looking for some help, I'm pretty new to Tableau but am impressed thus far and hope it can do the filter I need.

      I have a large set of data with order numbers.  Each order contains a Category which I have grouped into Departments for easier recognition.  I need to see which Order IDs contain multiple departments.  Specifically which contain "Metal" and anything else (and what that else is).  I've gone through a couple of threads and added pieces so hope I haven't made a mess.  Using Desktop v 10.0

        • 1. Re: Show which dimensions overlap groups
          swaroop.gantela

          Nicole,

           

          Welcome to the Forum.

           

          I made an attempt to replicate your scenario using the Sample Store dataset.

          (I was not able to get into your workbook as it was asking for datasource permissions.

          I think you may need to extract your data before creating your twbx.)

           

          In the example below, my higher level was Category and the lower level was Sub-Category.

          I used Level of Detail calculations to fix different aspects to the Order ID.

           

          To Flag whether the Order ID has multiple Departments, you could use:

          { FIXED [Order ID]:COUNTD([Department])}>1

           

          To Flag whether the Order ID contains "Metal":

          { FIXED [Order ID]:MAX([Category]="Metal")}

           

          You could then create your target group using:

          IF [Flag Multiple Categories] AND [Flag Department Metal]

          THEN "Target" ELSE "Other" END

           

          You could then put the above Target Group on Rows, Order ID on Rows,

          and  Department on Columns to get a visualization of the groups.

           

          The example also shows how to make a label of all the Departments for an OrderID.

          which I can describe further if needed.

           

          Please see the workbook v10.3 attached in the Forum Thread.

          1 of 1 people found this helpful
          • 2. Re: Show which dimensions overlap groups
            meenu choudhary

            Hi Nicole,

             

            Not able to open attached workbook as its asking for password.

             

            Anyhow have used superstore data for your scenario. You can try below approach:

            NOTE: Replace "Furniture" with "Metal" for your scenario.

             

            1. Multiple IDs ={FIXED [Order ID]:COUNTD([Category])}

            2. Furniture =  {FIXED [Order ID]:max(if [Category]="Furniture" then 1 else 0 end)}

            3. Flag = if [Multiple IDs] >1 and [Furniture]=1 then "Show" else "Hide" END

            1 of 1 people found this helpful
            • 3. Re: Show which dimensions overlap groups
              Nicole Anderson

              Sorry about my attachment not working.  I was able to follow your code and that is giving me the direction I am looking for.  Next I will take it a step further to only show the Target when there is more than one department.

              Thank you so much for your help!

              1 of 1 people found this helpful
              • 4. Re: Show which dimensions overlap groups
                Nicole Anderson

                Thank you Meenu. Sorry for the attachment not working. I am going to explore your approach for this and future reports that I'm pulling.  Thank you for your help.