9 Replies Latest reply on Aug 24, 2017 1:45 PM by Joe Oppelt

    Grouping Measure Names

    Diogo Braga

      I'd like to group rows 1-3 as Reading/Writing (ELA) and rows 4-6 Math. Any suggestions?

       

       

      2017-08-24_1500.png

        • 1. Re: Grouping Measure Names
          Joe Oppelt

          Create a calculated field:

           

           

          IF CONTAINS([whatever that field is], "ELA") then "ELA"

          elseif  CONTAINS([whatever that field is], "Math") then "Math"

          Else "Other"

          END

           

          Make that a dimension.  Place it in front of [whatever that field is] on your ROWS shelf.

          • 2. Re: Grouping Measure Names
            Joe Oppelt

            And if you remove [whatever that field is] from ROWS after you put the new calc on there, you'll aggregate all the numbers by those new categories.

            • 3. Re: Grouping Measure Names
              Diogo Braga

              Thank you!

               

              [whatever that field is] is Measure Names...and it doesn't seem to work when this is the case.

              • 4. Re: Grouping Measure Names
                Joe Oppelt

                Oh.  Let me look at the workbook.

                • 5. Re: Grouping Measure Names
                  Joe Oppelt

                  Yup.  I should have looked first.  Can't do what I suggested with measures.  I just assumed those measure names were dimension values.  My bad.

                   

                  What do you mean by "grouping"?

                   

                  Would mere colors do the trick?  What I have attached is just using row banding.  It works because you have groups of 3 measures that go together.  If you had one chunk of 4 and one chunk of 7 and one chunk of 2, etc., banding wouldn't do it here.

                   

                  See attached.  Maybe this gets you by.

                  • 6. Re: Grouping Measure Names
                    Diogo Braga

                    Thanks again!I

                     

                    I couldn't see the workbook because I didn't get the latest Tableau update yet.

                     

                    I am trying to create a table similar to this. My goal is to group subject and have a column for it.

                     

                    2017-08-24_1618.png

                    • 7. Re: Grouping Measure Names
                      Joe Oppelt

                      I just assumed that if you could upload a workbook you would have the version of tableau that it was created in.

                       

                      Here is what I did in my version:

                       

                       

                      If you want to do the grouping shown in your screen shot, you'll need to get an additional dimension into your data:  Reading/Math/Science/Other.  It's called re-shaping your data.

                       

                      I would have an additional dimension where you'd put those categories.  Then instead of having separate chunks of measures for Math and Reading and Science, you would have multiple rows, one for each category, and just have three measures:  Achievement, Learning gains,  Learning Gains Lowest 25%.  In the Math row you would put the 3 math values.  In the Reading row you would put the 3 reading values.  Etc.  then you would have the category on your sheet, and the 3 measures, and they would come out sorted correctly for each category.

                      • 8. Re: Grouping Measure Names
                        Diogo Braga

                        Got it. Re-shaping data outside of Tableau right? I was hoping there was a solution in Tableau...

                        Your proposed solution might work.

                         

                        Thank you!

                        • 9. Re: Grouping Measure Names
                          Joe Oppelt

                          Yes, outside of Tableau.  Then again, assuming you have the same sort of groups for all major categories in your list of measures, there is a PIVOT function that will "convert" you measure names to a dimension.  You get a dimension name called "Pivot Names" (I think that's what it's called) and another column named "Pivot Values".


                          With a series of calcs you can create what I described if you can do a pivot on these measures.

                           

                          Right now you don't have full triads of measures for each of your categories, but I'm assuming you will down the road.  So this is another option.

                          1 of 1 people found this helpful