Others

How to Create Yes and No Percentage Values for an Access Pie Chart

Chanuka GeekiyanageChanuka Geekiyanage Nov 2, 2026 869 views

Question details

The user needs to display Yes and No categories as calculated percentage values rather than raw counts in a modern Microsoft Access pie chart.

How to Create Yes/No Percentage Values for a Pie Chart in Access
Product
Microsoft Access
Device & OS
not provided
Scenario
Creating a modern pie chart in an Access form or report to visually summarize a Yes/No field representing broken versus working machines.
Observed behavior
The built-in modern chart calculates and displays the raw count of records but does not automatically convert or format these results as a percentage of the whole.
Before you start

Ensure you have a working backup of your Access database before creating or modifying queries. Familiarize yourself with switching to the SQL View in the Access Query Design window to paste the necessary SQL syntax.

Solution 1Recommended

Use an Aggregate Query to Calculate Proportions

Create a custom SQL query that groups records by the Yes/No field and divides the count of each group by the total number of records to generate an exact decimal proportion.

Modern Access charts rely directly on the data returned by their source query. By manually calculating the proportion in the query itself, the chart can accurately format and display the resulting decimal values as true percentages.

1
Open Query Design

Open your Access database, navigate to the Create tab on the ribbon, and click Query Design. Close the Add Tables dialog box without selecting anything.

2
Switch to SQL View

Right-click the new query tab at the top of the workspace and select SQL View from the context menu.

3
Enter the Calculation Syntax

Paste the following SQL code, replacing 'tblMachines' and 'Broken' with your actual table and field names: SELECT IIf([Broken],"Yes","No") AS BrokenStatus, Count(*)/(SELECT Count(*) FROM tblMachines) AS Percentage FROM tblMachines GROUP BY IIf([Broken],"Yes","No");

4
Save and Apply to Chart

Run the query to verify the results and save it. Insert a modern Pie Chart onto your form, select this saved query as the Data Source, set Category to 'BrokenStatus', set Value to 'Percentage', and format the Data Labels as Percentages in the chart settings.

Use an Aggregate Query to Calculate Proportions
Dynamic Calculation: This method ensures that as you add or remove machine records in your database, the percentage values will automatically recalculate and update on your chart.
Free Microsoft Office alternative

Discover WPS Office for Easier Data Analysis and Charting

While Microsoft Access handles complex relational databases, WPS Spreadsheets offers an incredibly intuitive, lightweight, and free alternative for analyzing tabular data. You can generate stunning pie charts with automatic percentage calculations in seconds, completely bypassing the need to write complex SQL queries.

  1. 1. Input Your Data: Open a new blank workbook in WPS Spreadsheets and type 'Working' and 'Broken' with their respective counts into two columns.
  2. 2. Insert a Pie Chart: Highlight the data range, go to the Insert tab on the top ribbon, and click the Pie Chart icon.
  3. 3. Enable Percentage Labels: Click on the generated chart, select the Chart Elements icon (plus sign), check Data Labels, and format them to display Percentages automatically.
Completely free to download and use for everyday tasksFully compatible with Microsoft Excel (.xlsx) formatsCreate pie charts and display percentages instantly with a built-in UILightweight application that runs smoothly on all devices
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't the Access modern pie chart calculate percentages automatically?

Modern Access charts plot the exact numerical data returned by their underlying queries. If your query outputs raw integer counts instead of proportional decimals, the chart uses those raw counts. It does not perform internal division to find the percentage of the whole.

Can I just format my raw count data labels as percentages in the chart settings?

No. If you apply a percentage format to a raw integer (like the number 5), it will multiply it by 100 and display 500%. You must first calculate the decimal proportion (e.g., 0.05) within the SQL query before applying the percentage format.

Does the IIf function work in all versions of MS Access?

Yes, the IIf (Immediate If) function is a standard, built-in function in Microsoft Access across all versions. It is highly effective for evaluating a boolean condition (like a Yes/No field) and outputting specific text labels for your charts.