It is election time in USA, and that means there is a whole lot of drama, discussions and of course data analysis. There are tons of cool visualizations published on all the data. Previously, we talked about “How Trump happened” chart.
Today let’s take a look at the beautiful decision tree chart by NY Times explaining what would happen if each of the 10 swing states vote for Democrats or Republicans. Go ahead and look at that chart. And when you are done playing with it, come back.

My first thought after looking at the chart is: Wow, that is cool. I wonder how we can recreate that experience in Excel?
But as you can guess, making a dynamic tree visualization in Excel is pretty hard. You can create a bubble chart mixed with XY chart to show all the nodes of the decision tree, but as this tree has 2^10 nodes at the bottom level (and 2^11-1 total nodes) our chart would look very clumsy and busy.
So, instead of replicating NY Times chart, why not make our own version that explains the data? You can reuse this idea when visualizing outcomes of several what-if scenarios.
Demo of interactive decision tree chart in Excel
First, take a look at our Trump vs Hillary chart.

How to create a decision tree visualization in Excel – Tutorial
1. Arrange decision and outcome data
In a table (or range) list various decision and outcome combinations. For our case of Trump vs. Hillary in 10 swing states, there will be 2^10 outcomes (1024). Arrange this data in a format like below.

2. Calculate the outcome
Based on each of the decision combinations, calculate the outcome and add it as a column to your table. Alternatively, you can also type or import the outcome data (along with decision combinations)
3. Create a pivot table from your data
Since we are going to use slicers for user interaction, we need to create a pivot table from all this data.
Add all the decision variables and outcome to row labels area. Rearrange the pivot in tabular layout. Disable sub-totals and grand totals.

4. Add slicers
Go to Insert > slicer and select all the decision parameters. In our case, we will pick all the 10 state names.
Once all the slicers are inserted, format them.
- Set up slicer labels in multiple columns
- Adjust their size
- Apply a custom style if you prefer.
- Keep the headers on the slicers for now. We will remove them at a later stage.
Related: Comprehensive guide to slicers – what, how, where, when and why
5. Calculate % of outcomes for each candidate
Now that we have slicers, whenever you make a selection, the pivot table will be filtered. Calculate number of outcomes favoring each candidate and use that to make a stacked bar chart.

6. Add bells & whistles
You can add a few bells and whistles to this pretty slicer controlled stacked bar chart even prettier.
- Add messages that display %s (or confidence levels etc.) for each outcome.
- Display the outcome once it is certain (a la head shot of Hillary or Trump)
Related: Display shapes & images in Excel charts
So there you go. Your interactive decision tree visualization is ready.
Oh, last but not least – resetting all slicers
This is the only place we need to open the hood of Excel and mess with internal wiring. Just add a simple macro to reset all slicers in the workbook. Then assign this macro to a text box with the text “Reset all” on it.
Sub resetSlicers()
'Reset all slicers
Dim sC As SlicerCache
For Each sC In ActiveWorkbook.SlicerCaches
sC.ClearManualFilter
Next sC
End Sub
Download decision tree visualization workbook
Click here to download decision tree visualization example workbook. Play with the slicers to find outcome of 2016 US election. Copy the ideas to your model / dashboard to showcase outcomes based on user inputs.
Note: this workbook has VBA. Enable macros to enjoy the reset button.
How do you visualize decision trees
As I said earlier, making decision trees in Excel is tricky if not hard. If you have Power BI, you can use R scripts to make a decision tree. But if you are stuck with Excel, creating a dynamic tree like structure is tricky. That is why, I went with the stacked bar chart approach.
What about you? How would you visualize various scenarios and outcomes in Excel? Please share your thoughts and implementations in the comments section.
Want more? Check out these awesome Excel charts
Here are few more inspiring Excel charts for you.
- Mapping spread of obesity in USA
- Earth vs. Venus cosmic dance (pictured aside)
- Mapping up & down trends in a time series
- Narrating story of change
- Network chart to map relationships between people
- More advanced charts














22 Responses to “Master Excel 2007 Ribbon with this Free Learning Guide”
Thank you, kind sir. Well done with the baby making.
I cannot get signed up for your newsletter. I tied both this email address and churchill2001@hotmail.com. never a response.
I cannot get signed up for your newsletter. I tied both this email address and churchill2001_at_hotmail_dot_com. never a response for either attempt.
@Doug, it shows that your email address is pending verification. Can you check your inbox (and may be spam folder too) for an email from me? The subject will be "Activate Subscription to Get your Free Excel Tips E-book"
[...] PPS: If you are struggling with ribbon, you should check out ribbon learning guide. [...]
Very Useful Info..Keep it up..
@Ajay.. you are welcome 🙂
how do u download microsoft excel for free?
http://www.microsoft.com/en-us/default.aspx
Select Office
Free Trial
[...] Excel 2010 UI looks considerably better and less stressful than 2007. The colors are dull and subtle. The icons don’t call for attention unless you want to do something. The menus / ribbons feel smoother and slicker. [Learn to use Excel Ribbon with this Free e-Book] [...]
I can't open this pdf. I get the error message:
You do not have the required license to open this file.
Please request a license from the creator of the file, and add it using the license manager and they try opening it again.
What gives??
I downloaded the file again and it worked this time. Strange. (First file was 116 KB, second was 1644 KB... ???)
[...] More ribbon goodness | Free e-book to learn Excel Ribbon [...]
Hi Chandoo,
thanks for sharing your Excel 2007 learning experience with us; unfortunately the link to the pdf of the free Excel 2007 learning guide seems broken: my Acrobate Readers flags: "Unkown file type or corrupte data".
Have a nice day
Michael
well done this is great
Can somebody just provide a link the classic TAB exportedUI files for MS Office 2003 for us to use in office 2007/2010?. searching online, everybody just wnats to make a buck online with silly Classic Tab installers which do nothing more than inport exportedUI files for you.
Don't give me a ribbon how to guide, just give me free exportedUI files. I should not have to pay anyone for this, it is free XML, MS should have included this to begin with.
thanks
Dear.
There are a set of debit values and a set ot credit values in a column. I want a vba code by whcich the debit value plus a single / multiple credit value is zero that needs to be marked .
finally i will come to know out of the avaibale debits which cannot be used the with avilable credits either single or multiple values.
If multiple matching sets are available let it take the 1st or the 2nd one its not an issue.
Column A Ref
-1000 A
-5000 B
-8000 C
800 A
100 A
100 A
2000 B
3000 B
13000
15000
hi...
how to make this add-ins and display in ribbon... check this sample : http://www.cprsoft.com/GCDemo01.htm
thank you sir...
Please tell me format painter short cut key In excel ?
Thanks In Advance
thankfully.likeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
I am very much happy for such a great opportunity given to excel learners to advance their skills for the betterment of the future. I am a great user of this site and feel proud to have come across this web site.
I appreciate this, because I didn't do much works in my project management studies using gantt chart. As of now are have now learned some advancement.