May 24, 2012
Creating an interactive monthly calendar in Tableau is easier than you might think
Dustin’s post does an excellent job of taking you through creating a calendar viz step-by-step. But I felt it fell a bit short in the end since you didn’t actually see a calendar. Dustin’s end product looks like this:
Ok, let’s get to it.
Step 1 – Create a list of dates in Excel and open the data in Tableau.
Step 4 - Right-click drag the Date field onto the Row shelf and choose the WEEK(Date) discrete format
Your view should look like this:
Step 5 – Clean up the view a bit by right-clicking on the Date label and choosing Hide Field Labels for Columns
Step 6 – Right-click on the WEEK(Date) pill on the Rows shelf and uncheck Show Header
Your view should look like this:
We’re getting close!
Step 7 – Right-click drag the Date field onto the Text shelf and choose DAY(Date)
Step 8 – Align the Text to the top right, center the header for the WEEKDAY(Date (copy) field, re-size the view a bit and we now have a beautiful calendar.
Ok, sweet, we have something that looks exactly like a calendar, but so what? This doesn’t tell us anything.
Consider that you want to see the profit ratio for your sales (or any other metric) displayed on each day as a color. This is where data blending comes in handy.
Step 9 – Connect to the Superstore Sales data source (or any other data you want to use, as long as it has a date field)
Step 10 – Create the data blending relationships. Go to the Data menu and choose Edit Relationships. You will need to create these Custom relationships:
Step 11 – Create a calculation for Profit Ratio by right-clicking on any field and choosing Create Calculated Field
Step 12 – Drag the Profit Ratio measure onto the Color shelf
That’s it! You must admit this is pretty cool.
Note that Tableau defaults positive and negative colors to the Red-Green palette; you might want to change it for those color blind folks out there (and to keep Steve Wexler off your back).
If you want to take it a couple steps farther, you could show the quick filter for the MY(Date) field, create a parameter to allow for any of several metrics to be chosen, and on an on to make it a truly interactive analysis.
In the version embedded below, I changed the color palette to Red-White-Green so that those days without any sales would be white instead of gray.
Try this with your own data. I bet your users will find this incredibly useful, especially as a performance monitoring tool.
November 7, 2011
Makeover of a Makeover – Waterfall vs. Side-by-side Bar Chart
One of the great things about the data viz world is that people are always willing to listen, learn and share. Cole Nussbaumer over at storytelling with data (a great blog you should follow) recently conducted a visual makeover on some horrible charts submitted during a class she was teaching. and she was willing to share her data with me so that I could make my own viz. Where else do you experience such camaraderie?
The improvements she recommends are fantastic, but I recommended one improvement to this chart she created:
Typically when I see side-by-side bar charts I’m looking to compare the bars that are next to each other. However, in this case, the bars are not necessarily related; they are simply a list of expenses and income next to each other. I recommended she create a waterfall chart like this one done with Tableau:
To me, a waterfall chart communicates the expenses vs. income story of this data more effectively
- The bar sizes make comparisons easy. It’s clear that Programs are the largest expense and Grants are the largest income.
- You can easily see the total variance without having to do the math in your head.
- Other Expenses are much larger than Other Income. I wonder what’s included in those expenses. Looks like an area for investigation.
- This group should probably focus a bit more on Sponsorships so that they’re not so dependent on Grants.
I could have included labels for all of the bars, but I wanted to show the patterns and relative sizes without the numbers being a distraction.
You can download the original Excel data here and/or the Tableau workbook here.
P.S. I chose red/green bars for two reasons: (1) most people understand red as negative and green as positive when reading financial figures and (2) to annoy my friend Steve Wexler of the Data Revelations blog (another you should follow), who hates this color scheme more than anyone I know.