5 Replies Latest reply on Apr 23, 2018 8:15 AM by Joe Oppelt

    Turn off nesting multiple dimensions

    Lin W



      I'm creating cross-tabs of demographic vars by year.  I would like


                          2010   2012  2013  2014






      Age Below 25

      Age Above 25




      Dragging these to the row dimension, Tableau insist on nesting these within each other, but that's not the output we want.  Any ideas how to turn off nesting?


      I know there is a way to do it, but given that I have 10+ vars, it will be painful to create separate workbook for each then drag to a dashboard.


      I have attached the superstore workbook as an example.

        • 1. Re: Turn off nesting multiple dimensions
          Joe Oppelt

          I think you want to make separate measures that give you the count of males, and the count of females, and the count of Asians, etc.


          When you put dimensions on the sheet, Tableau's behavior is to nest them.  It just is.


          So make a calc called [Male].


          IF [Gender] = "Male" then 1 END.


          or if you have a [Male] dimension, do


          IF [MALE] = "Y" THEN 1 END


          One way or another, get a measure that has a 1 in the new calc if that row indicates "Male'.  Then you use SUM([Male Calc]) to get the count you want.

          Do the same for all the other characteristics.

          • 2. Re: Turn off nesting multiple dimensions
            Jim Dehner


            Not certain I understand but is this the view you want



            it so this is how it is done


            your workbook is attached


            If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

            • 3. Re: Turn off nesting multiple dimensions
              Lin W

              I really appreciate your time, Jim, in detailing your response to me; however I'm looking for a non-nested solution, which means Segment would have to go directly below Category and not nested within it.  Thank you~

              • 4. Re: Turn off nesting multiple dimensions
                Lin W

                Thank you, Joe. So I would have to make 10+ Calcs converting the values of each var to a 1 or 0 value?  Then I should be able to list them on under one column?

                • 5. Re: Turn off nesting multiple dimensions
                  Joe Oppelt

                  Given the description you have in your first post, that would be my approach.


                  you can get any number of measures to line up in separate rows so you can report them by year as you show in your original post.


                  Sheet 2 in the example shows how to mix and match counts from different dimensions.  You can see that you can add as many such measures as you want into the Measure Values shelf.