To create a simple pie chart using Boolean values TRUE/FALSE, you can use the COUNTIF function in Google Sheets. This is quite simple to do and so this tutorial is meant for beginner level Sheets users.
Assume you want to compare the monthly performance of two employees based on their daily target and achievement. Since the Pie chart is best to visualize numerical proportion and also easy to read, we can use that in this specific scenario.
In my sample data, there are three columns. The first column contains date entries and the other two columns are filled with TRUE/FALSE checkboxes for each employee.
You May Like: How to Convert TRUE/FALSE to Checkboxes in Google Sheets.
Here is my sample data and I am only taking 15 days performance of two employees to minimize the number of rows (size) in the screenshot.
I have inserted the above checkboxes using the INSERT menu “Tick box” command. A ticked (checked) box has the value 1 (TRUE) and unchecked has the value of 0 (FALSE).
Must Read: 10 Best Tick Box Tips and Tricks in Google Sheets.
Let’s see how to create a Pie chart using the count of these Boolean values in Google Sheets.
How to Create a Pie Chart Using Boolean Values (TRUE/FALSE) in Google Sheets
Here are the Countif formulas to use.
First count the total ticked boxes in B2:B (Employee 1). You can use the below formula in cell D1.
={B1;countif(B2:B16,TRUE)}
New to Countif? Then please check my functions guide.
Additional Tip:
As an alternative you can use the SUM function too! Yes, but not in the regular way.
={B1;ArrayFormula(sum(n(B2:B16)))}
This Array Formula can also return the count of B2:B. In this, the N function converts the Boolean TRUE to 1. So the SUM function can identify such values as numbers and sum. Since the N function is non-array, we must include the ArrayFormula function.
This is just for your info. You can use the Countif provided above.
Now in cell E1, use the below Countif formula to count of the column range C2:C16.
={C1;countif(C2:C16,TRUE)}
In the next step, I am going to create a Pie chart using the above Countif formula outputs.
- Select the cells D1:E2 that contain the formula results.
- On the Insert menu, click on “Chart”
- Select “Pie chart” and enable “Switch rows to columns”.
See that Pie chart setup.
We have created a Pie chart using Boolean values in Google Sheets. In concise, to create a Pie chart that involves Boolean values, you must count or sum the fields that contain TRUE/FALSE or tick boxes.
Related Reading: