2 Replies Latest reply on Aug 14, 2013 9:00 AM by Harley Ellenberger

    percentage of total calc in treemap

    Harley Ellenberger

      I have a treemap that is showing percentage of total units amongst different advertisers.  The labels in my visual are displaying correctly, showing the percentage of the total that each advertiser accounts for.

       

      I'm struggling with a secondary calculation.  Each advertiser belongs to an Ultimate Owner.  The blue shaded advertisers belong to CMAG_Ultimate Owner = P&G, the orange shaded advertisers belong to CMAG_Ultimate Owner = Other.  I'd like to have a calculation that gives me the percentage of total units for all P&G owned advertisers (all blue shaded advertisers).  And I want to use that calculation in my title.  I need that calculation to be dynamic so that the result changes based on the quick filters that are selected on my dashboard.

        • 1. Re: percentage of total calc in treemap
          Aaron Clancy

          You need to create groups for your color condition and use the group instead of the field as the color detail.  Then create a calc    sum([UNITS])/window_sum(sum([UNITS])).   Add that calc to the label detail and compute using Advertiser.

          Screen Shot 2013-08-14 at 10.13.49 AM.png

          Screen Shot 2013-08-14 at 10.09.28 AM.png

          • 2. Re: percentage of total calc in treemap
            Harley Ellenberger

            That's close, but not quite what I'm looking for.  The calculation you suggested is giving me the percentage of each advertiser within P&G and the percentage of each advertiser within Other.

             

            I need a "P&G percentage of the whole" and an "Other percentage of the whole".

             

            In your example, each orange shaded piece would have the same percentage, and each blue shaded piece would have the same percentage.  Ultimately I'm using the calculation only in the title (not the labels), so I only need the percentage of the blue shaded pieces.