How to Display Data Label Percentages with Decimals and total in numbers in a Donut chart

Hi,

I have a requirement like, I want to display the Percentage in decimals and the total value in Number in a Donut chart. Is there a way to do this ?

In the below screenshot,
I want to see the percentage values in decimals like in Donut 1 and the Total value like in Donut-2, combining both in one single Donut (Total in number and percentage in Decimals)

Thank you!

Hello @praveen.gp

Amazon Quick Sight currently does not support displaying both percentage in decimals and total value in numbers simultaneously in a single Donut chart directly. However, you can achieve a similar effect using a combination of calculated fields and customization within your visual.

Here’s a step-by-step approach:

  1. Create Calculated Fields:
  • To display the percentage in decimals, create a calculated field for the percentage value.
percentage_field = {measure} / sum({measure}) * 100
  1. Customize the Donut Chart:
  • Add your calculated percentage field and your total measure to the Donut chart.
  • Format the percentage field to display decimals (you can do this in the field’s settings).
  1. Custom Tooltip:
  • Use the custom tooltip feature in Quick Sight to display the total value. You can configure the tooltip to show additional information such as the total value in numbers.
  1. Combine Visuals (Optional):
  • If the above method does not fully meet your requirement, you can create two separate visuals: one Donut chart displaying the percentage in decimals and another visual for the total value. Place them together in the analysis sheet to give the appearance of a combined chart.

Here is an example of how to configure the calculated fields and tooltip:

  1. Percentage Calculated Field:
  • Create a new calculated field:
percentage_value = sum({your_measure}) / sumOver(sum({your_measure}), [], PRE_AGG) * 100
  1. Format Percentage Field:
  • Format the percentage_value field to display in decimals (e.g., 2 decimal places).
  1. Custom Tooltip Configuration:
  • Go to the chart settings, enable the custom tooltip, and add the total value field to the tooltip configuration.

By following these steps, you can create a Donut chart that displays percentage values in decimals and provides the total value as a tooltip. This workaround leverages the customization options available in Quick Sight to meet your specific requirements.

1 Like

Hi @praveen.gp ,

Response from @Xclipse is right for most part.
I will add on couple of things.

  • You can’t really add both the calculation and total measure to the donut chart simultaneously as mentioned in Customize the donut chart section (#2 in above response).
  • You can create the percentage calculation more easily using the percentOfTotal function (Sample below)
percentOfTotal(sum(Sales),[])
  • For combining/overlaying visuals, you need to enable Free-form layout from Toolbar > Sheets > Layout settings. The borders and selection colors of the overlaid KPI visual can be turned off from it’s visual properties to get a more polished look.

Here’s a sample of how a donut overlaid with a KPI will look.

Regards,
Arun Santhosh
Pr Quick Sight SA

3 Likes

Thank you @ArunSanthosh

Thank you @ArunSanthosh
Free-form is a an option. But I am trying to do in titled format !