Thursday, December 5, 2013
Monday, December 2, 2013
Happy Holidays 2013 Tableau Edition
Happy Holidays in 2013!! I was trying to solve a pretty simple problem and got a little carried away. The problem was to calculate the military format for "durations" - e.g. convertings seconds into DD:HH:MM:SS format. F5/Refresh this page to update the viz. I could have also added a forced javascript refresh, or better yet, a full blown image retrieval and slideshow example... but that would have been sort of spammy to the Tableau Public infrastructure. :) Enjoy!
Tuesday, October 15, 2013
Tableau Stepped Values
Filed under "stupid pet tricks" (should that read "stupid tableau tricks" ?), this handy calc form can provide all kinds of rounding tricks:
(int([tablecalc]*[Number of Steps])) / [Number of Steps]
Where "tablecalc" is a Tableau Table Calculation and "Number of Steps" is a Tableau Parameter. See example below. Enjoy!
Tuesday, September 17, 2013
Tableau "Add to Context" Filters
I like to review ancient Tableau features from time to time, just to make sure things haven't changed. A Tableau "Add to context" filter is one of these.
The Feature called "Add to Context" is a great way to look at a subset of data inside of Tableau. It works by attempting to create a TEMP table in the database (which may or may not always succeed, depending on the database and your permissions - we are assuming that TEMP tables succeed for this blog post). As such, this feature can also be considered "dangerous" if it is not used correctly. Two areas where it is used incorrectly are:
1. Returning all the records from the original join or data connection.
Consider an imaginary table of data which is 100 million rows. The proper use of "add to context" is to filter down to 800k rows (for example), perhaps for one segment, customer, line of service, or whatever dimension you want. The improper use of "add to context" is to select everything in the filter. This has the effect of creating a new, second 100 million row table. If the originating data model was a multiple table join, the resulting context table is a single, denormalized, fully indexed Tableau TEMP table. A nice denormalizing effect, but largely useless if you are simply recreating the original 100 million rows. Now imagine you have Tableau Server thrown into the mix: each time an end user interacts with this sheet or dashboard, a new 100 million row TEMP table will be created. Not good... the solution is do not do this, please!Don't select all the field values in a "add to context" filter. It defeats the purpose of using this feature in the first place.
2. Returning a very wide table result when you only need some of the columns.
Let's continue to use the 100 million row example. But this time, we will stipulate that it contains 160 dimensions and 65 measurements. 225 columns in total. The feature "add to context" will dutifully create a TEMP table with all of these columns, and indexes on each column. This could take a long time to generate, before you even get to the analysis itself! If you do not need them, you can hide fields prior to using "add to context". Once hidden, they will not be included in the TEMP table output. This can have a huge performance impact on your use of "add to context".
In an actual test against a 40 million row table, we ran a context filter on a very wide and a more narrow Tableau result set. The wide data connection took 47.57 seconds to A) create the TEMP table, B) index the columns and C) query the "number of records". You can see all of this in the Tableau desktop logs. By the way, it's worth pointing out how amazing this fact is, that Tableau generates all of the correct SQL code for this. However, the result is huge and wide. This data connection had 50 dimensions and 32 measurements.
We ran the same exact "add to context" test against a second data connection which only had 11 dimensions and 4 measurements. This time the query took 13.98 seconds. This was a 340% reduction in query time!
Be careful when using this feature. It can be a huge time saver - as well as a huge pain...
Sunday, September 8, 2013
Tableau as a Web Application
This is a draft of a work in progress, designed to showcase how to build web applications using Tableau Server, Tableau Online, or Tableau Public. To get started, take note that there are hyperlinks on the front door. On each subsequent tab, there are help icons (with useless help) as well as a home icone to take you back to the main screen. Most of these dashboards are also highly interactive. Tableau can be used to build applications, not just provide analytics.
Wednesday, August 14, 2013
Get Your Brasil On
Two years ago I wrote two posts about Brazilian geocoding and mapping here and here. Since that time, the Brazilian government website IBGE.gov.br seems to have removed their city level shapefiles, or at least, I cannot find them. LUCKILY, I kept a copy of the polygon data set that I created.
Shown below is the entire country. Click a state to drill down. There are no metrics in this data set. The assumption here is that you will use data blending for your analysis. I also make no warrants or guarantees about the accuracy of the polygon data or about how up to date the boundaries are.
Monday, August 12, 2013
Tableau Menu Navigation using Parameters
I didn't see a good example of using Tableau "Parameters" to create navigation systems. I could have sworn there were some good ones out there; so if you have any, post them in the comments section.
The basic trick is to
- place number of records and a parameter onto a sheet called "navigator".
- On various dashboards, create a Tableau Action, source is this navigator sheet, target is the destination dashboard, filters are set to "leave filter", fields are set to "all", and the action is of type "menu".
- You will need to create lots and lots of these. Each menu to each dashboard from each source...
Wednesday, August 7, 2013
Tableau Measurement Conversions
There are lots and lots of measurement converter utilities out there - in javascript, perl, html, asp, java, whatever - but I haven't seen one in Tableau yet!
So here you go :) ...enjoy!
Wednesday, July 31, 2013
Revisiting Sparklines in Tableau
In the Seattle Times print edition (various days), there is a interesting micro chart in the business section which, for a 52 week stock price range, shows a circle on a range of "low to high". (I cannot seem to find an online example of this chart)... It's really a 0 to 100 percentile. The circle is the last price of the stock, and the range is the lowest to highest for the date range. At a glance you can get a sense of where the stock currently is along the date spectrum. I have recreated that concept below. Also thrown in is a sparkline. These viz make use of Tableau Table Calculations, of course.
This viz is set to 400x150 - nice and micro! - the concept could be quite useful for online media outlets. Download the workbook to study the solution. Enjoy!
Monday, July 29, 2013
Cells Gone Bad...
Part of me is almost embarrassed to post this. But part of me is like "yeah, why not - take that silly rabbit!"...
No part of me is going to post any type of description of the solution, because it's not best practice; it's not very pretty; and it's just not that cool... luckily you can download the workbook and play around.
hint: use the scrollbars...
Wednesday, July 17, 2013
250K
Alan Smithee Presents hit a quarter million page visits this week. He is enthralled and also loves it when we talk about him in the third person. Let's take a moment to remember all those forgotten features, websites, memes, viz types, and other assorted socio politics -visual errata from years gone by... ok now please stop doing that.
Thanks for all the great clickings on the 'puters!! We loves our alter ego. It's pppprrrrrecious to us!
Thursday, July 11, 2013
Team Geiger Rides Again...
Over two years ago I gave a shout out to Team Geiger in this blog post. Well, this team of superstars has updated their awesome workbook to version 8. Lots of new viz types, both functional and business.
Check it out...
Monday, July 1, 2013
Modulo Function
I'm trying to make sense of a) the world we live in, and b) the modulo function in Tableau - all in one fell swoop. The viz below is the best I could come up with. Print out your very own geopolitical bingo card. Chances are good that you will get five in a row in any given news week...
Wednesday, June 12, 2013
Chess Data in Tableau
Tableau has a public visual on The Best Chess Openings - a great viz by Ben Jones.
This made me curious as to what it might take to generate chess data for plotting in Tableau. It's non-trivial. I am still working on that script. In the meantime, here's a short game from the 1600's. Enjoy!
And here is Joe Mako's improved version, from his comment below:
Thursday, June 6, 2013
Filtering Measure Names via URL
I love learning something new. We stumbled across the fact that you can filter the special "measure names" dimension via URL. I am sure this is not supported by Tableau, but it appears to work great. A few things to worry about:
- It starts with &[:Measure%20Names] - take note of the colon in there!
- You need the internal name of the data source, not the display name - see example below
Here is an example URL:
http://public.tableausoftware.com/views/MeasureNamesURLFiltering/TestDashboard?:embed=y&:display_count=no&[:Measure%20Names]=[excel.41431.369623564817].[sum:Cost:qk]
"excel.41431.369623564817" is the name of my datasource. "Cost" is one of the measures. Enjoy!
Monday, June 3, 2013
Tableau and Multiple Trend Models
Following on some previous work where we calculated the basic linear regression model in Tableau manually using calculations and Table Calculations, we can extend this a bit to allow multiple regression models. In the example below, we start with the manual calculations for various average metrics from the IPEDS higher education data set, as compared to a primary metric “Total Gross Revenue”. From here we can enable color. And from there we can have Tableau automatically calculate a new regression model based upon the color. This means we end up with one primary linear regression model, and two sub-models for elements above and below the primary model. Hope you find this useful in some manner…
Tuesday, May 14, 2013
Purchasing History Using Table Calcs
This subject is nothing new to Tableau, but one I revisit all the time. A client asked me "I want to total up the customers but only those that have purchased something within thirty dates of their first purchase ever." Table calcs to the rescue using a special form of which I am a big fan. See the intro tab below. Enjoy!
Monday, April 22, 2013
IPEDS School Data
Enjoy!
Wednesday, March 27, 2013
Fedscope Data
This data set comes from the US federal government "Office of Personnel Management" - the data is the latest reported as of march 2012. The direct link is here.
All the panes in the dashboard below are "hot". Start clicking around to see where our federal salary dollars are being spent. Click on any whitespace to clear the selection for that pane. Enjoy!
Monday, March 25, 2013
Tableau Server Integration with Salesforce
Update 03/31/2014: Tableau has released a Salesforce canvas solution, which consists of excellent documentation and example workbooks. Check out their blog post:
http://www.tableausoftware.com/about/blog/2014/3/now-available-salesforce-canvas-documentation-embedding-tableau-29499
Or download the zip file here
original post:
- Get access to and analyze Salesforce data with offline/on-premise hardware using Tableau Desktop or Tableau Server.
- Get access to and analyze Salesforce data online/in the cloud using Tableau Desktop or Tableau Server.
- Provide row-level security for Salesforce data when using Tableau Desktop or Tableau Server (example: sales reps seeing only their relevant information)
- Provide URL links from a Tableau dashboard to relevant Salesforce information.
- Embed a Tableau dashboard into the Salesforce web interface. (example: when looking at an account in Salesforce, there is a Tableau dashboard embedded into the account view showing details for that account)
- Integrate Salesforce authentication with Tableau Server authentication when all users are behind a firewall using Active Directory. Desired behavior is that end users only have to log into a web application once.
- Integrate Salesforce authentication with Tableau Server authentication when users are outside a firewall and not using Active Directory. Desired behavior is that end users only have to log into a web application once.
- Encryption technologies. Ensure that Tableau Server is running with SSL enabled.
Pros
|
Cons
|
Provides an easy, automated method of aggregating
Salesforce data offline for analytics
|
Requires on-premise hardware and local installation of
SQL Server.
|
Allows integration with other local systems inside the
corporate network
|
Requires configuration and setup and ongoing DB
maintenance.
|
All standard and custom Salesforce objects are supported.
|
This is very straight-forward to configure. You can of course design your embedded dashboards to look however you want them to.
Monday, March 11, 2013
Excel Color Palette
Pasted below the viz is the xml to add to your tableau preferences file to get the "excel color palette". Why you ask? No particular reason. I have also garishly formatted this viz to make the excel users more comfortable. Enjoy!
<color-palette name="excel" type="regular">
<color>#000000</color>
<color>#FFFFFF</color>
<color>#FF0000</color>
<color>#00FF00</color>
<color>#0000FF</color>
<color>#FFFF00</color>
<color>#FF00FF</color>
<color>#00FFFF</color>
<color>#800000</color>
<color>#008000</color>
<color>#000080</color>
<color>#808000</color>
<color>#800080</color>
<color>#008080</color>
<color>#C0C0C0</color>
<color>#808080</color>
<color>#9999FF</color>
<color>#993366</color>
<color>#FFFFCC</color>
<color>#CCFFFF</color>
</color-palette>