Published: 16 Jun 2023 Last modified date: 16 Jun 2023
Question
How to create a panel style chart with pie charts all side by side for comparison.
The example below shows a pie chart of Sales by Subcategory, segmented by Region.
Current Behavior
Article Solution
Environment
Tableau Desktop
Answer
Please follow along with the attached sample workbook to the right of this text in the Attachments section.
Step 1
Connect to the sample data and create two calculated fields.
1. Connect to the Sample Superstore data from Tableau Desktop. 2. Create a new calculated field as follows: Name : Columns Size Calculation : int( (index()-1)/(round(sqrt(size())))) 3. Create a new calculated field as follows: Name : Rows Size Calculation : (index()-1)%(round(sqrt(size())))
STEP 2
Create a panel chart.
4. On the Marks card, change the mark type to Pie. 5. Drag Sales to Angle on Marks. 6. Drag Region to Color on Marks. 7. Drag Sub-Category to Detail on Marks. 8. Drag Columns Size to Columns and Rows Size to Rows. 9. Right-click on Columns Size placed on Columns then select Edit Table Calculation and set as follows: 10. Right-click on Rows Size placed on Rows then select Edit Table Calculation and set as follows: 11. Drag Sub-Category to Label on Marks. 12. Drag Sub-Category to Filters and click OK. 13. Right -click on Sub-Category placed on Filters and select Show Filter. 14. Right-click on Columns Size placed on Columns and select Show Header. 15. Right-click on Rows Size placed on Rows and select Show Header.
Thank you for providing your feedback on the effectiveness of the article.