1. Skip to navigation
  2. Skip to content
  3. Skip to sidebar

Here at Juice we build fewer Excel dashboards than we used to. Excel itself is a decidedly imperfect vessel for any serious development–it’s simply too easy to veer off of the disciplined track onto the underbrush.

Even so, Excel remains a playground where we can do surprising things. For instance, check out our Excel lightbox and an Excel tagcloud. We could appropriate everything that you find on the webbiest of Web 2.0 websites and build our Uruk-hai equivalents.

The key to staying on the rails when building Excel tools–either dynamic dashboards or simply to explore data–is discipline. At Juice, we use a methodology that we call “DTP” (Data Tansform Present). The foundation of DTP is the rigorous separation of data from presentation. This is similar to a well-known approach when building computer user interfaces called Model-View-Controller.
I’m going to cover some of the key principles and we’ll follow up with an example later on the blog.

Data

Data is the raw material of any visualization or report. It needs to be easy to add data or change data without having to change anything else about your dashboard.

We store raw data with dimensions preceding metrics in blocks in separate worksheets. If you want to sound pretentious, you can call this “first PivotTable normal form”. Key points:

  • Have one worksheet for each data source.
  • Call these sheets “Data”, or “{Title} Data”.
  • Place them at the end of your workbook.
  • Data is snug to the top left of the spreadsheet. This allows us to use dynamic ranges. Dynamic ranges let you add data and have it automatically incorporated in all PivotTables.
  • Ensure that column names are in the first row.
  • Place your dimensions before metrics.
    Dimensions before metrics

Transform

We use PivotTables to transform the data into the structure we need.

  • Call these sheets “Transform” or “XXXXXXX Transform”.
  • Create one sheet for each issue that you are exploring. This doesn’t mean that you will only create one PivotTable. You may have multiple PivotTables to support different views or perspectives on an issue.
  • Turn on “show items with no data” for row and column dimensions. Show all items
  • We are seeking predictability, we want to the PivotTable to always be the same size regardless of what the PageField filters are.
  • Place all the dimensions that aren’t used as rows or columns in the PivotTable as page fields. Every dimension should have a home.
    All dimensions must have a home

    • Set all PivotTables to not store data and refresh on open.
      PivotTable settings

Present

The Presentation page copies data from the Transform page(s) and formats it for display. It also allows users to control what data is being displayed.

  • Build a user interface to interact with your data. There are many ways to let people interact with your data, but one of the easiest is to use a PivotTable as your interface. This is described below.
  • We use an in-house style guide for graphs that you can see in our Chart Chooser.
  • If the Presentation page is likely to be printed, preset the print range.
  • When copying data from the transformation page to the presentation page, blank values will come out as zeros. We use a simple formula, =if(’Transform!A2’<>"",’Transform!A2’, ""), to ensure that blanks remain blanks.

Using a PivotTable as your interface

A simple way to let people manipulate your data is place a PivotTable containing only PageFields but no data on the presentation sheet. A Visual Basic macro triggered to run whenever the PivotTable changes then pushes out any changes to the master PivotTable to all the PivotTables on your Transform sheet.

Here is the code to make this happen.

This drives our PivotTables in concert and ensures they stay in sync.


That’s a basic overview of our DTP technique. You can try a simplified version of DTP here.

DTP Example.xls

We’ll be back soon to talk through this example.

Topics:
, , ,
  • Jperez

    Hi. I want to share a trick I added to your repertoire. Besides separating the dimension from the metrics, I added some columns of labels built by concatenating two or more dimensions of interest. For example, I could have a “year_month” column with data such like “2008_12″. Then I can do a sumif(year_month column, “2008_12″, metrics column) and sumarize on one cell all metrics for December.

  • Bill D

    I use basically the same construct, but I use the GETPIVOTDATA function with data validation dropdowns and INDEX-MATCH lookups.

    I think GETPIVOTDATA can be slightly more flexible, identifies errors more readily, and does not require macros to recalculate automatically. Also, showing all items for all dimensions is not very practical for larger data sets with many dimesions.

  • JJD@IBM

    I have developed a similar approach to my Excel report applications, especially when I have multiple data sources, but with the following adaptations:

    If I’m not allowed to customize the source data report, I tend to do some row-level transform formulas on the data worksheet to the right of the data itself. It could be as simple as parsing month, date, year from a text field, and calculating the quarter. Or I may be comparing multiple columns using nested IF statements and providing some preliminary “decision” about that data at the row level. When I paste in the updated source data, I just have to copy down that block of cells with formulas to match the length of the data. Dynamic ranges and pivot tables do the rest.

    Even if I’ve done some Row-level Transforming on the Data worksheet(s), I still create a Table-level Transform worksheet with a pivot table to establish the dimensions for my data and perform consolidation — often that’s just subtotaling rows at some meaningful detail level.

    Finally, I use a combination of data filters and vlookups/etc to pull the Transform layer onto the Present worksheet instead or macros. I avoid macros because most of my financial report users panic when they open an Excel file and the macro Enable/Disable warning pops up!

  • paresh

    On a more philosophical level……

    If it is a imperfect tool why waste the time learning it. And if experts are having problems staying off the underbrush the novices/intermediate users have no chance.

    I personally feel excel is getting a bad name because users who have not been fully trained try to do too much – I have seen the same thing with SAP users and even developers.

    I believe that what excel needs is structured training – intermediate users can do their own analysis but any formal reports should be done by power users and only these reports should be used in the business.

    Incidentally if you have minimised the use of excel what are you using instead. What are your views on excel friendly olaps?

  • Jonah Feld

    If you trade a dynamic range for Excel 2007′s Tables, or write a procedure to resize a static range, you’ll get much better performance.

    Offset is a volatile function, and using it in a dynamic range makes all dependent formulas (but not those sourced from a PivotTable result, like GETPIVOTDATA) recalculate constantly. With a large workbook, it can get pretty slow.

  • Sandro

    Hi there,

    Are there members of juiceanalytics on Twitter?

    Regards.
    Sandro.

  • Chris Gemignani

    Sandro: A number of us are on Twitter. You can try chrisgemignani and zachgemignani to get started.

  • cgraves

    Long time listener, first time caller. I must say, you guys have created quite a wealth of information around the face of business intelligence. THANK YOU for sharing all of this great information and example templates. This might be a bit of a nitnoid question as you guys are tool agnostic but have you run across Excel Services in your travels. I think you have some really cool charts but they don’t travel well to Excel Services and was wondering if you had aligned some of your graphs and graphics to take advantage of that tool set for end user reporting.

  • lucy

    waaooo, what a great thing it is !

  • Jacob

    I am having trouble getting rid of zeroes from my charts. Where exactly does the formula =if(‘Transform!A2′<>“”,’Transform!A2′, “”) go?

    Thanks in advance

  • nicholas

    You say that you don’t use Excel that often anymore to create dashboards. What tools do you use or recommend these days to build dashboards?

  • Zach

    Nicholas, Most of our dashboards are web applications using Flex and our open-source visualization library JuiceKit (www.juicekit.org).

  • Patrick

    Wow – Thanks so much, I love it and this make life with Pivottables so much easier! Goes right into our weekly reports!
    One question: I always thought I know Pivottables pretty good – but how do I add Pagefields without Data so that the blue frame does not show up like in the example file? Thanks for your help! I love your tools and have been an avid user of the Chart Cleaner for years now. :-)

  • shawnify

    Typo in third paragraph: “DTP” (Data Tansform Present)

  • Pingback: Re-Creating AdWords Campaign Performance Charts in Excel, Part 1: The Data | NexGen SEM

  • Pingback: Re-Creating AdWords Campaign Performance Charts in Excel, Part 2: The Transformation | NexGen SEM

  • Pingback: Re-Creating AdWords Campaign Performance Charts in Excel, Part 3: Making the Scorecard | NexGen SEM

  • Pingback: Re-Creating AdWords Campaign Performance Charts in Excel, Part 5: Dynamic Controls | NexGen SEM