5 Replies Latest reply on May 9, 2018 8:25 PM by Brad Veitch

    Percentage of Subtotal Help

    Roman Kokoszka



      I'm struggling to create a view that shows the percentage of subtotals, rather than grand total. I tried using the table calculations and "Compute Using" - "Table (Down)" and "Pane (Down") with no luck. I took a snapshot of what I would like my workbook to look like. Currently, my data is just taking the row value divided by the grand total. In excel, I could create this view in pivot tables using the "Show Value As - % of Parent Total" and select the field from which to base the Parent from. Not sure how this translates into Tableau.


      Thank you in advance...


        • 1. Re: Percentage of Subtotal Help
          Simon Runc

          hi Roman,


          I've mocked you up an example using super-store EU...


          So you need to set the Table Calc compute using to the level you want the %age of total run over



          In my Example this is Sub-Category (but for you it would be Product).


          Let me know if this doesn't make sense, and I can go into a bit more detail.

          • 2. Re: Percentage of Subtotal Help
            Roman Kokoszka

            Thank you for the quick response Simon.


            The "Sub-Category" shows in your example, but not in my workbook. Do you know the reason why that option "Sub-Category" wouldn't be available? Is it because there are too many columns to the left of the values?


            • 3. Re: Percentage of Subtotal Help
              Simon Runc

              Yes I do!!...so I can see from the little 'Orange' icon on your Product field that this is blended in from a secondary source. Field's from secondary sources come in 'aggregated' (if you try and create a calculated field in your primary, and make it just this field from your secondary, you'll notice Tableau forces you to create the field as aggregated - it's default is to wrap it in a ATTR which is an aggregate). As such  it doesn't act like a primary data-source dimension.


              In an ideal world you'd join the 2 together when loading so are in a single datasource (...appreciate this is not always possible if they reside in different schema, or data is at different grain). Alternatively we might be able to make that field a measure (using the aggregation ATTR, MIN or MAX) and then (an undocumented feature!!) of un-selecting 'Ignore in Table Calculation' (which you can access by clicking on the pill). This will depend on how it's set up (grain, blend fields...etc.)...are you able to mock up an anonymised version of your workbook? and I can have a play. 

              • 4. Re: Percentage of Subtotal Help
                Roman Kokoszka

                Yes Simon, the data is blended (3 separate data connections). I have both extracts and Live connections in this workbook. For what it's worth, this might be easier for me to do in excel at the moment (already did it). I don't want to take up your time on this. Thanks for the explanation.

                1 of 1 people found this helpful
                • 5. Re: Percentage of Subtotal Help
                  Brad Veitch

                  In your measure, create a Table Calculation where Calculation Type = Percent of Total and Summarize the values from = Pane (Down)