1 Reply Latest reply on Jul 1, 2016 3:16 AM by Simon Runc

    Dynamic percentage display in donut

    Sri K

      Hi friends,

       

      index.jpg

      These filters(Manager,technology) are multi select filter.

       

      Values in the "Total server count" based on Manager filter while values in the "Selected technology in server count" based on Manager and technology both.

       

      percentage shown in donut=( "Selected technology in server count" / "Total server count") *100

       

      Here donut is partitioned by selected and non selected values.

       

      Below case is link for more understanding on selected and non selected:

      https://community.tableau.com/thread/208518

       

      Note:

      Percentage in donut should not get affected irrespective of any no. of managers selected from filter "Manager". That percentage only get affected from choosing 2nd filter "Technology".

      Here technology filter is showing relevant values based on manager..

       

      Providing sample data as attached twbx.

        • 1. Re: Dynamic percentage display in donut
          Simon Runc

          hi Sri,

           

          ...Excellent diagram of your issue!!

           

          So I think I've understood the problem, and we can solve this with FIXED LoDs...as these are unaffected by filtering (or we can control which filters affect it), once we set the FIXED Dimension properly.

           

          btw I only have 9.0 and 9.3, so the attached is in 9.3

           

          So first I've created a FIXED LoD for all Server Counts

          [Server Count TOTAL - LoD]

          {SUM([Server Count])}

           

          Then created a FIXED LoD for the server count per Tech

          [Server Count Per Tech - LoD]

          {FIXED [Technology]: SUM([Server Count])}

           

          Now in the Donut, we don't want the whole TOTAL value (we just want the un-selected part)...so we create this calculation from the above

          [Server Count Non Selected - LoD]

          [Server Count TOTAL - LoD]-[Server Count Per Tech - LoD]

           

          I can then use the measure names/value to create the %ages on the Donut chart

           

          The 'How it works' tab shows you what's going on

           

          Hope this solves your issue and makes sense, but if not please post back, and I can either go into more detail, or try again (if I've misunderstood the requirements!)