{"id":391,"date":"2014-11-07T21:23:35","date_gmt":"2014-11-07T21:23:35","guid":{"rendered":"http:\/\/arunethan.com\/?p=391"},"modified":"2015-12-01T16:27:52","modified_gmt":"2015-12-01T16:27:52","slug":"creating-a-donut-chart-in-tableau","status":"publish","type":"post","link":"http:\/\/arunethan.com\/?p=391","title":{"rendered":"Creating a Donut chart in Tableau"},"content":{"rendered":"<div class=\"pf-content\"><h2><span style=\"color: #000080;\">Use-case<\/span><\/h2>\n<p>Steps for recreating the Donut chart example shared in Tableau community site.<\/p>\n<p><a title=\"Donut Chart in Tableau example\" href=\"http:\/\/community.tableausoftware.com\/docs\/DOC-5511\" target=\"_blank\">http:\/\/community.tableausoftware.com\/docs\/DOC-5511<\/a><\/p>\n<p>A donut chart representing the percentage of top customers by profit across product categories<\/p>\n<h2><span style=\"color: #000080;\">Steps<\/span><\/h2>\n<p>1. Create a new Tableau workbook and connect to &#8220;Sample &#8211; Superstore &#8211; English (Extract) data source<\/p>\n<p><a href=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-392\" src=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture.png\" alt=\"Capture\" width=\"423\" height=\"461\" srcset=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture.png 423w, http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture-275x300.png 275w\" sizes=\"(max-width: 423px) 100vw, 423px\" \/><\/a><\/p>\n<p>2. Created a Calculated field &#8220;zero&#8221; with value 0<\/p>\n<p><a href=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-395\" src=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture2.png\" alt=\"Capture\" width=\"643\" height=\"604\" srcset=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture2.png 643w, http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture2-300x281.png 300w\" sizes=\"(max-width: 643px) 100vw, 643px\" \/><\/a><\/p>\n<p>3. Create a calculated &#8220;% of Profit top customers&#8221; &#8220;Top customers by Profit&#8221; Sets is used with measure &#8220;Profit&#8221;<\/p>\n<pre>SUM(\r\n IF\r\n [Top Customers by Profit]\r\n THEN\r\n [Profit]\r\n ELSE\r\n 0\r\n END\r\n )\/SUM([Profit])<\/pre>\n<address>\u00a0<\/address>\n<address><a href=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-398\" src=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture4.png\" alt=\"Capture\" width=\"523\" height=\"460\" srcset=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture4.png 523w, http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture4-300x263.png 300w\" sizes=\"(max-width: 523px) 100vw, 523px\" \/><\/a><\/address>\n<p>4. Drag the dimension &#8220;Category&#8221; and measure &#8220;zero&#8221; (calculated field we just created) to the column shelf<\/p>\n<p><a href=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-397\" src=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture3.png\" alt=\"Capture\" width=\"593\" height=\"305\" srcset=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture3.png 593w, http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture3-300x154.png 300w\" sizes=\"(max-width: 593px) 100vw, 593px\" \/><\/a><\/p>\n<p>5. Make &#8220;Top customers by Profit&#8221; sets as COLOR mark and select PIE chart under the drop down<\/p>\n<p><a href=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-401\" src=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture5.png\" alt=\"Capture\" width=\"447\" height=\"334\" srcset=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture5.png 447w, http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture5-300x224.png 300w\" sizes=\"(max-width: 447px) 100vw, 447px\" \/><\/a><\/p>\n<p>6. Make SUM(Profit) the angle marks<\/p>\n<p><a href=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Cap.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-405\" src=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Cap.png\" alt=\"Cap\" width=\"531\" height=\"513\" srcset=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Cap.png 531w, http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Cap-300x289.png 300w\" sizes=\"(max-width: 531px) 100vw, 531px\" \/><\/a><\/p>\n<p>7. Add &#8220;zero&#8221; measure again to the column shelf<\/p>\n<p><a href=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-406\" src=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture6.png\" alt=\"Capture\" width=\"986\" height=\"557\" srcset=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture6.png 986w, http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture6-300x169.png 300w\" sizes=\"(max-width: 986px) 100vw, 986px\" \/><\/a><\/p>\n<p>8. Remove all the marks from the SUM(Zero) (2) Marks selection<\/p>\n<p><a href=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-408\" src=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture8.png\" alt=\"Capture\" width=\"749\" height=\"518\" srcset=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture8.png 749w, http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture8-300x207.png 300w\" sizes=\"(max-width: 749px) 100vw, 749px\" \/><\/a><\/p>\n<p>9. Reduce the size of the marks in \u00a0SUM(Zero) (2) add\u00a0&#8220;% of Profit top customers&#8221; as label and make the second sum(zero)(2) as dual axis<\/p>\n<p><a href=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-409\" src=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture9.png\" alt=\"Capture\" width=\"659\" height=\"485\" srcset=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture9.png 659w, http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture9-300x220.png 300w\" sizes=\"(max-width: 659px) 100vw, 659px\" \/><\/a><\/p>\n<p>add\u00a0&#8220;% of Profit top customers&#8221;<\/p>\n<p><a href=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-410\" src=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture10.png\" alt=\"Capture\" width=\"724\" height=\"549\" srcset=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture10.png 724w, http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture10-300x227.png 300w\" sizes=\"(max-width: 724px) 100vw, 724px\" \/><\/a><\/p>\n<p>Dual axis selection<\/p>\n<p><a href=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture11.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-411\" src=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture11.png\" alt=\"Capture\" width=\"606\" height=\"436\" srcset=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture11.png 606w, http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture11-300x215.png 300w\" sizes=\"(max-width: 606px) 100vw, 606px\" \/><\/a><\/p>\n<p>10. Format the colors accordingly and remove the headers<\/p>\n<p><a href=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture12.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-412\" src=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture12-1024x410.png\" alt=\"Capture\" width=\"720\" height=\"288\" srcset=\"http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture12-1024x410.png 1024w, http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture12-300x120.png 300w, http:\/\/arunethan.com\/wp-content\/uploads\/2014\/11\/Capture12.png 1323w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Use-case Steps for recreating the Donut chart example shared in Tableau community site. http:\/\/community.tableausoftware.com\/docs\/DOC-5511 A donut chart representing the percentage of top customers by profit across product categories Steps 1. Create a new Tableau&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":412,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[105],"tags":[63,28],"_links":{"self":[{"href":"http:\/\/arunethan.com\/index.php?rest_route=\/wp\/v2\/posts\/391"}],"collection":[{"href":"http:\/\/arunethan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/arunethan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/arunethan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/arunethan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=391"}],"version-history":[{"count":8,"href":"http:\/\/arunethan.com\/index.php?rest_route=\/wp\/v2\/posts\/391\/revisions"}],"predecessor-version":[{"id":413,"href":"http:\/\/arunethan.com\/index.php?rest_route=\/wp\/v2\/posts\/391\/revisions\/413"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/arunethan.com\/index.php?rest_route=\/wp\/v2\/media\/412"}],"wp:attachment":[{"href":"http:\/\/arunethan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/arunethan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=391"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/arunethan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}