1. The goal of this Google Sheets formula is to end up with an inverted pyramid chart with bar sparklines that represents our data.

Here's the base formula being used: =SPARKLINE({1-A2,A2} , {"charttype","bar" ; "color1","white"}).

Step 1 image

2. The goal of this Google Sheets formula is to end up with an inverted pyramid chart with bar sparklines that represents our data.

Here's the base formula being used: =SPARKLINE({1-A2,A2} , {"charttype","bar" ; "color1","white"}).
Step 2 image
Thanks to Ben Collins for his Google Sheets Tip #277: Create pyramid charts with bar sparklines
Click here to access more of Ben's bar sparklines tutorials
3. You could simply cut-and-paste that formula into your first results cell, but we'll explain it more fully to allow you to make minor changes to address different kinds of data.

We've copied the data from the finished example to help our walk through. 

Step 3 image

4. Where our prototype formula used reference cell A2, now our reference cell is D2.

Click into the next top cell, and Type =1-D2, which means show 100% minus the amount in D2, and Press Enter. Here, D2 is 40%, so E2 should result in 60%.

Step 4 image

5. In our example, we did get 60%.

To copy down this formula, with the cell selected, use your mouse to Click and Drag the blue handle, then Drop it in the last cell where you want to apply the formula.

Step 5 image

5b. Drop

Step 5b image

6. The formula resulted in each cell being the remainder of the reference cell from 100%.

You've completed the first step.

Step 6 image

7. According to Ben, for the second step we want to create an array "to capture both the original value and the 'gap' value."

Click into the cell that currently has your formula.

Step 7 image

8. To tell the formula to make the first cell of the array the same as our value, and then the second cell of the array into the gap between 100% and our data value, Type ={D2,1-D2}, and Press Enter.

Step 8 image

9. The array shifted the results to show the value in E2 and the remainder of 100% minus the value in cell F2.

With your mouse, Select both cells, so we can copy down this formula.

Step 9 image

10. Use your mouse to Click and Drag the blue handle, then Drop it in the last cell where you want to apply the formula.

Step 10 image

10b. Drop

Step 10b image

11. You now have both the values and their gaps in columns E and F.

You've completed the second step.

Step 11 image

12. For the third step, Click into the cell that currently has your formula in it, and Type =SPARKLINE({D2,1-D2},{"charttype","bar"}), and Press Enter.

Step 12 image

13. You just told Sheets to "wrap this array with the SPARKLINE function and specify the 'bar' as the chart type."

Once again, u
se your mouse to Click and Drag the blue handle, then Drop it in the last cell where you want to apply the formula.

Step 13 image

13b. Drop

Step 13b image

14. You've created a bar chart using the selected array of data.

You're finished the third step.

Step 14 image

15. For the fourth step, Click into the cell with the current formula, and Type =SPARKLINE({D2,1-D2} , {"charttype","bar" ; "color2","white"}), and Press Enter.

Step 15 image

16. You've told Sheets to only show a visible color on one part of the bar.

With your mouse, Click and Drag the blue handle, then Drop it on the last cell where you want to apply the formula.

Step 16 image

16b. Drop

Step 16b image

17. The fourth step is complete, and you have the beginning of a cascading bar pyramid.

Step 17 image

18. For the fifth step, let's align the chart to the right.

Click into the cell with your current formula, and Type =SPARKLINE({A2,1-A2} , {"charttype","bar" ; "color2","white" ; "rtl",true}), and Press Enter.

Step 18 image

19. Ben noticed, however, that Sheets still has a slight colored border around the sparkline chart. Here, that's an orange border around each white bar in the bar chart.

That takes us to the sixth step.

Step 19 image

20. Ben recommends flipping the data around instead of using the "rtl" property.  To switch the order of the array, Type =SPARKLINE({1-A2,A2} , {"charttype","bar" ; "color1","white"}), and Press Enter.

Step 20 image

21. That removes the bar outline.

To copy the formula down, with your mouse, Click and Drag the blue handle, then Drop it on the last cell where you want to apply the formula.

Step 21 image

21b. Drop

Step 21b image

22. You've created your first pyramid chart using bar sparklines.

But what if it's not percentages for which you want a chart?  Our second example uses dollar amounts, and instead of a base of 100%, it uses a base of $5,000.00.

Step 22 image

23. To accomplish this change of data type, we'll be replacing the 1 that represents 100% with the goal in the form of a number to use for comparison. 

Remember to also change the reference cell when you're using data from another cell. 

Step 23 image

24. Note, we've copied the formula as text here to clearly show to replace D2 with A9, and replace the '1' with a number amount; this example used 5000, which does not need to be formatted as currency.

Step 24 image

25. Now you can create and modify simple pyramid charts using bar sparklines.

Step 25 image

Interactive tutorial

** Best experienced in Full Screen (click the icon in the top right corner before you begin) **