Adding Box Plots to Show Data Distribution in Dashboards [Part 6 of 6]

Posted on October 29th, 2008 in Analytics , Charts and Graphs , Learn Excel - 10 comments

This is a Guest Post by Robert on Visualization Techniques for Excel Dashboards.

This 6 Part Tutorial on Management Dashboards Teaches YOU:

Part 1: Creating a Scrollable List View in The Dashboard

Part 2: Add Ability to Sort on Any KPI to the Management Dashboard

Part 3: Highlight Values Based on Percentile

Part 4: Add Microcharts to Management Dashboards

Part 5: Compare 2 Decision Parameters in the Dashboards Using Form Controls

Part 6: Show the Distribution of a Parameter using Box Plots

In this final post we will learn how to add a box plot to show the distribution of values

The solution

The most common way in descriptive statistics to visualize the distribution of sets of numerical data is a box plot. But according to my experience in day to day business, most business people are not familiar with this type of visualization.
Therefore we try to create a simpler chart which is hopefully easier to understand:

The light grey bar visualizes the range of all values, the dark grey bar the range of the 10 items displayed on the management dashboard table. The cross shows the total average and – similar to the bullet graphs – the vertical line represents the target. This is less information than a real box whisker plot would provide, but I guess it will be easier to understand.

The implementation

Download the Excel KPI dashboard final workbook and read on how to create a simplified box plot.

  1. Let’s bring our ducks in a row first. Calculate all necessary data to be shown in the box plots: the minimum and maximum of the total data and of the 10 displayed items on the dashboard, the average and the target. The formulas are quite simple. You can find them in the downloaded workbook in calculation!AZ23:BE27.
  2. The basis of our visualization is a stacked bar chart with only one category and 4 data series:
    1. the invisible bar (the bar between 0 and the total minimum),
    2. the left light grey bar (the bar between the total minimum and the minimum of the displayed 10 items),
    3. the dark grey bar (the bar between the minimum and maximum of the 10 displayed values) and
    4. the right light grey bar (the bar between the maximum of the 10 displayed items and the total maximum).

    Again the formulas to calculate these values are quite simple (see calculation!BF23:BI27).

  3. Create a stacked bar chart and format the bars accordingly (no fill color and no border for the invisible bar, light and dark grey fill colors for the other bars).
  4. Add the average and the target values as additional series to the chart and change the chart type of these new series to XY scatter charts (X is the average / target value, Y is a dummy 1). Format the average as a cross (or whatever you choose) and use the error bars to format the target as a vertical line. The method of creating a combination chart of bars and XY scatters is pretty much the same we used in the 4th post of the KPI dashboard series (here).
  5. Remove or hide all unnecessary chart elements: no fill color and no border for plot or chart area; no line, tick marks etc. for the vertical axes, etc.
  6. Repeat steps 3 to 5 to create charts for all 5 KPI.
  7. Bring the charts to the dashboard, position them and add a caption to explain the chart elements.

That’s it. Play around with the new feature: change the sort criteria or sort order or scroll up and down the dashboard table and see how the new charts are changing.

Final Remark

This is a simplified version of box plot visualization and works only for data sets with positive values. Of course there is also a more sophisticated way of creating charts like this for any data (positive and negative values, i.e. bars crossing the vertical axis). This is a bit more complicated since you need 8 data series for the bar chart instead of 4 but the principle is exactly the same.

Our final management dashboard looks like this (click on it for a larger version):

What’s next?

With this last part I guess the time may have come to end the series about Excel Management KPI Dashboards here and to hand over the further development of this dashboard to the readers of Pointy Haired Dilbert.
I do hope the series of 6 posts have been useful for your daily work and provided new ideas. Make sure you have downloaded the Excel KPI dashboard tutorial workbook
Thanks for all your comments and appreciations.
Last but not least: Chandoo, my friend, once more thank you so much for hosting my ideas at PHD.
Kind regards from Munich
Robert

Chandoo’s note

If not for Robert’s mail in August suggesting these wonderful ideas as posts in PHD, I would never have learned these things or shared them with you all. I am thankful to him for that.

Well, I am constantly trying to learn new dashboard techniques and I will try to share the worthy ones with you all. Meanwhile if you have a good idea for excel dashboards (or charts, techniques etc.) and would like to share with everyone, feel free to drop a comment or write to me. I will be *happy* to feature your ideas.

Further Reading on Management Dashboards in Excel

Checkout our exclusive section: management dashboards using excel for more tutorials, tips, design principles.



Learn how to create Excel dashboards.


| More
Excel School - Online Excel Training Program

Comments
nixnut October 30, 2008

Since version 3 Fabrice Rimlinger’s sparklines excel add-in also has a boxplot function:
http://sparklines-excel.blogspot.com/2008/09/boxplot-specifications.html

Nice dashboard btw :-)

regards,
nixnut

Robert October 30, 2008

nixnut,

thanks for pointing to Fabrice’s sparklines. I am already one of the biggest fans of Fabrice’s sparklines for XL as you can read in some of my other comments here on PHD:

http://chandoo.org/wp/2008/08/26/microsoft-excel-links/#comment-19991

But we intentionally did it without using Fabrice’s sparklines for 2 reasons:

1. One of our main goals was showing how to create analytical dashboards without VBA. I agree, VBA can add a lot of value to dashboard implementation and sometimes it is even inevitable. But still a lot of Excel users shrink back from VBA and therefore Chandoo and I decided to show some techniques with plain old Excel formulas.

2. Box plots are a great visualization technique and you can create them in Excel without VBA as well. But in my day to day business very often people are not familiar with the concept of box plots. That is why we tried to find an alternative which – hopefully – is easier to understand. I am not sure whether or not it really is easier to understand. This was just a first try.

nixnut November 1, 2008

I understand. Fabrice’s sparklines only need the user to allow vba code to run though. The user doesn’t have to do any coding.

Last year we had a topic about boxplots in excel on Stephen Few’s forum. There may be some useful information for interested people. Including a link to a workbook by excel grand master Jon Peltier. See http://www.websitetoolbox.com/tool/post/sfew/vpost?id=1757218.

regards,
nixnut

azmat January 1, 2009

Hi chandoo,

first i wish you a very happy new year……….well this is something i got on new year’s eve but inspite of trying hard i couldn’t succeed so now i need your help…..

The thing is i have lengthy PDF file names in one column and want to extract characters to the right of last “\” entered….

I tried below formulae but it fails for entries which are too lengthy…….

=LEFT(RIGHT(SUBSTITUTE(TRIM(B2)&”",”\”,REPT(” “,40)),40),40)

azmat January 1, 2009

Also i wanna know how to learn all this….i mean i mainly deal with such problems only like string manipulation these left mid right combo’s…………and i really wanna be an expert in that….tell me what should i do for this?

Chandoo January 2, 2009

@Ajmat: You formula is failing for lengthy names since you are assuming max length of the name is 40 characters (and using rept(” “,40) )..

Why dont you try this formula: =TRIM(RIGHT(SUBSTITUTE(A4,”/”,REPT(” “,255)),255))

(you recommended it here: http://chandoo.org/wp/2008/11/11/excel-formula-help-finding-repeated-words-cell/#comments)

Again, the above formula assumes max. length of 255 chars (which should be fine for almost all cases), but depending on your needs, you may want to adjust the 255 to a number higher than that.

Btw, string manipulation in excel is little cumbersome due the lack of powerful (and simple to use) formulas. I suggest adding VBA UDFs whenever you feel a certain thing is taking too much time and leave it at that instead of trying to solve all by using existing formulas.

Happy new year to you :)

RSS feed for comments on this post. TrackBack URI

Leave a comment

   Name (required)

   E-mail (required, never displayed)

   URL


If you have a question, please ask in the forums

Recommended Excel, Charting, VBA books