1. Create a calculated field "Pie_Size" as below:
2. Select both "Pie_Size" from Dimension and whatever value column from Measure and select Pie chart from Show Me.
3. Pie_Size goes to Color, Angle and Size both would be taken as SUM
4. Change Angle and Size to Count
5. Click on "Abc" icon (Show Mark Labels) to show the count on the pie chart
Hope this helps.
Pie_of_Count.twbx.zip 7.1 KB
Hats Off Sir ... It is working perfectly. Thanks a lot.
1) I want to display "Negative" & "Positive" text instead of count. How can I do it?
3) How to give 3D feel to pie chart ?
2) can I show 2,3 charts on one sheet? Like 2 pie charts + 1 line chart + description etc..
U R Welcome.
1. To display Negative and Positive text, drag "Pie_Size" to Label (above color)
2. I am not sure whether 3D chart types are supported in Ver 7.
3. To show multiple charts you need to prepare them on individual sheets and combine them in a dashboard
Thanks Ravi !!!
Now I want to add comments below this chart like ...
"Total Degradation = <Sum of Negative Values>"
How to do this?
You can do this by adding a caption to the worksheet. Go to Worksheet>Show Caption. Double click on the caption to edit it. Then, you can use the Insert Button to have the value of the field appear.
Hope this helps!
You have to use Mark Annotation feature to accomplish this. A little bit of trial and error led to the finding that: you can insert a column value in annotation or tooltip only when the column is available in any of the shelves of the worksheet. However, in your exmaple, the pie chart is on COUNT and not SUM.
1. Create another calculated field called "Degradation" as below: (we want to display absolute value of sum of negative values)
2. Drag Degradation to Level of Detail shelf - anywhere else, it changes the original pie chart
3. Now that the sum of all negative values is present on the worksheet, just mouse-over on each pie slice to see the Degradation. For the pie slice representing positive values, Degradation is 0.
4. Create a Mark annotation by right-clicking on the Negative pie, select Annotate - Mark... and then save it.
5. Position the annotation by dragging it around so that it does not hide any portion of the pie chart.
6. To test the requirement of the measure on the worksheet in order to be visible in tooltip, just remove the Degradation from Level of Detail and the annotation will now show "Degradation: Null"
Hope this helps.
Pie_of_Count.twbx.zip 6.2 KB
This thread comes up on google searches for "Tableau Piechart" and it's not the best way to do a pie chart. Perhaps a better way is to use the bin function. You might be able to build your bins across zero but if you have a single row of continues values you can graph them by right clicking on the dimension, selecting "bin" and creating bins... Note the "Size of Bins" is the value range per bin and not the # of bins you get.
Here's an example pie chart from a single measure that's been binned.