5 Replies Latest reply on Jul 3, 2017 10:20 AM by Joe Oppelt

    Multiple Aggregations of Measure Values in same sheet

    PJ S

      Hi,

       

      Is it possible to show multiple aggregations on measure values in same sheet? I have data across different categories (each category being a column) I need to show Categories by avg(scores) and have sum(categories)  in labels or tool tips.

      Or is it possible to duplicate Measure Names field?

        • 1. Re: Multiple Aggregations of Measure Values in same sheet
          Joe Oppelt

          Sure it is.  You just make different calcs to handle each separate measure aggregation.  Sometimes table calcs are needed.  Sometimes LODs.  Use the measure-values/measure-names technique to display as many columns of measures as you need to see.

          • 2. Re: Multiple Aggregations of Measure Values in same sheet
            PJ S

            Thanks for your response! yes that might work, but I need them on dual axis. scores on one axis and sums on other axis.

            Also I have scores in one column and sums on other column. Scores are calculated within Tableau.

             

            Example

            Day     Rubber_bands Rubber_bands_Score         Paper     paper_Score     Clips     Clips Score

            1               1                         10%                                  6                12%               4                 61%

            2               3                         12%                                   12                24%            3                  70%

            3               2                          11%

            4               5                         51%

            • 3. Re: Multiple Aggregations of Measure Values in same sheet
              Joe Oppelt

              Post a sample workbook.

              • 4. Re: Multiple Aggregations of Measure Values in same sheet
                PJ S

                Basically, this is how data is structured. Damaged score has a % value when Damaged=1 and null when Damaged=0

                same way for all scores.

                 

                I need a bar chart of survey Categories vs avg(Cat Score)

                with their respective counts on tool tips/labels/secondary axis.

                 

                 

                 

                 

                 

                Survey idState

                Damaged

                Counts

                Expired

                Counts

                Not Good

                Counts

                Tastes Awful

                Counts

                General

                Counts

                Customer Service

                Counts

                Damaged ScoreExpired ScoreNot Good ScoreTastes Awful ScoreGeneral ScoreCust Service
                  Score
                1GA001110
                2GA111100
                3GA000101
                4GA101011
                5GA110100
                6GA100011
                7GA111000
                8GA100110
                9GA011001
                10GA001110
                11GA011000
                12GA101101
                13GA111010
                14GA011101
                15GA110010
                16GA010101
                17GA010110
                18GA101101
                19GA001110
                20TX100100
                21TX011011
                22TX110010
                23TX001001
                24TX010100
                25TX001101
                26TX000010
                27TX011111
                28TX001000
                29TX001011
                30TX101101
                31TX111001
                32TX110011
                • 5. Re: Multiple Aggregations of Measure Values in same sheet
                  Joe Oppelt

                  Given that data, you can get a count by state:

                   

                  { FIXED [State] : count([Survey ID] }

                   

                  You can get a count of each measure where value = 1:

                   

                  { FIXED [State] : SUM([Damaged Counts]) }

                   

                  Then you display by state.  First calc as it is.  And the second calc divided by the first calc.

                   

                  I don't see anything about dates in the data, but if you want to compartmentalize it by day, then change the calc like this:

                   

                  { FIXED [State],[Date] : count([Survey ID] }