6 Replies Latest reply on Feb 15, 2016 2:40 PM by Tyler Garrett

    Unable to create Pie Chart

    Julie Jacobs

      Hi-- I am trying to create a basic pie chart. I have listed the top 30 Vendors by the # of Claims (filtered on the top 30 using the 'nested" technique: INDEX() and then placed it in front of Vendor Name on the row) . For some reason, I am unable to click on the "pie charts" icon in"Show Me" even though I am using a dimension and a measure. I attached a PDF because my info has PHI and I cannot upload the full workbook. Any Suggestions how to get around this?

       

      Thanks,

      Julie

        • 1. Re: Unable to create Pie Chart
          Daniel Vincent

          I think this is Tableau's subtle way of saying "Don't do this." 

           

          But if you must have a 30 sectioned pie chart you will need to build it yourself vs using show me.  Just select marks type as pie thenput your [Vendor Name] dimension on color, CNTD([Claim ID]) on size and angle.

           

          Screen Shot 2016-02-15 at 1.42.20 PM.png

          1 of 1 people found this helpful
          • 2. Re: Unable to create Pie Chart
            Stephen Shields

            Agree, a 30 section pie chart would need to be quite large to effectively see the different pieces; Tableau does not like to do this and Daniel is right, if it is truly what you must have you will have to force it to occur.

            1 of 1 people found this helpful
            • 3. Re: Unable to create Pie Chart
              Julie Jacobs

              Okay, got it. Then I will take a new approach!

               

              The attached pie graph is comprised of all 52 states. The brown section (largest- represents Wisconsin) is the In State claims. How can I change it so that all other states are all the same color and my pie graph then consists of only 2 portions, In State (Wisconsin) vs. Out of State (total of all others)?

               

              Again, I can only attach a PDF because the document has PHI.

               

              Thanks for your help Steve and Daniel!

               

              Julie

              1 of 1 people found this helpful
              • 4. Re: Unable to create Pie Chart
                Tyler Garrett

                Good afternoon Julie Jacobs,

                 

                Use the following calculation to group your data per your request above. You can replace your state dimension with this.

                 

                if [State]="Wisconsin"
                then "Wisconsin Rocks"
                else "total of others"

                end

                 

                Note: these types of calculations are requests on your data from Tableau. The larger the data - the longer this takes to run. This is why we are using ELSE to catch the rest of the states. Lastly these are CAP Sensitive. Always try to COPY and PASTE the "exact spelling" to make sure it will 100% work. You can also use Tableau's function 'group' to build this without.

                 

                Let me know if you have any other questions! If you can't get the calculation to work - I will make a workbook for you with the calculation working. Hope this helps! I absolutely love using DIAL charts. They are very beautiful.

                 

                Example.png

                 

                Cheers!

                 

                Tyler Garrett

                 

                VP of Solutions & Strategy

                TableauHelp.com LLC in Austin, TX

                2 of 2 people found this helpful
                • 5. Re: Unable to create Pie Chart
                  Carl Slifer

                  Hi Julie!

                   

                  Use the following formula:

                  IF [State] = 'Wisconsin' THEN 'Wisconsin' ELSE 'Other' END

                   

                  Then use this field on the colour shelf of your marks card instead of the [State] field.

                   

                  Cheers!

                  Carl Slifer

                  InterWorks

                  1 of 1 people found this helpful
                  • 6. Re: Unable to create Pie Chart
                    Tyler Garrett

                    Working in an environment with current customer data in the millions and we need to write every calculation as performant as possible.

                     

                    if [State]="Wisconsin"
                    then "Wisconsin Rocks"
                    else "total of others"

                    end


                    Note string value matching is the slowest thing in the database world! Any time you can clean up or turn into an INT() then you can turn your workbook from something that maybe going slow, to something that's split second. Be sure to use performance testing before implementing new calculations to end user consumption !

                     

                    A possible "faster" solution:

                    if contains([State],"Wis")=True
                    then "Wisconsin Rocks"
                    else "total of others"

                    end

                     

                    Here's a screenshot that used no calcs & Tableau's "Group"

                    1. Right click State

                    2. Create>Group

                    3. Find wisconsin (alphabetic sort) & click it

                    4. Click group

                    5. "Include Other" checked

                    2016-02-15 16_08_54-Tableau - for hunter.png

                    You're probably thinking, wow this is easier, why didn't we suggest it first? Because State (group) can not be used in a calculation. Notice below it's not currently usable in the calculation

                    2016-02-15 16_10_45-Dialog.png

                     

                    Cheers!

                     

                    Tyler Garrett

                    VP of Solutions & Strategy

                    TableauHelp.com LLC in Austin, TX

                    3 of 3 people found this helpful