Home | About | Log in | Get The Feed
Tableau Tip Tuesday – Splitting Metrics on Dimension Values

November

10

2009

I recently came across this question on the Tableau forums. Serendipitously, I had just started doing this and had worked out the rather simple solution. Because someone other than me had raised the question, I thought it might be worth sharing here.

The Problem: Splitting a measure into discrete, sub-measures based on the values of a dimension.

The Why: Lets say you have a measure ‘Sales’ and a dimension ‘Product Type’ (this should sound familiar as its from the ‘Coffee Chain’ sample DB). Further assume that you want to do some parts-to-whole comparison which could be achieved via a table calculation but there are a couple of practical issues with that. One, the table calculation is basically a virtual object and so you can’t use it in downstream calculations and two, if you only want to display a specific dimension-value — ‘Coffee’ for instance – I can’t filter for ‘Coffee’ and still show its part-to-whole relationship correctly. By splitting the measure into discrete sub-measures we can perform operations and calculations on the data that otherwise might not be possible.

Here’s what the post on the Tableau Forum said by way of further illustration:

[H]ave a look at the attached xls file. You see that I have a column called "Indicator". I now would like to make a scatter plot with KPI_1 on the x-axis, KPI_2 on the y-axis, and using KPI_3 to size the circles.

I thus somehow need to split my dimension "Indicator" into 3 specific components for each of the KPI. Can this be done in Tableau ? Or is it mandatory to have basically one column in your data source, per dimension?

The solution is fairly simple although it may not be particularly intuitive. We’ll leverage the LOGICAL function ‘IIF’ which tests whether a condition is TRUE or FALSE and returns a specific response depending on the condition. So, using the Coffee Chain sample Access DB…

  1. Right-mouse click on ‘Product Type’ in the Dimensions shelf
  2. Select ‘Create Calculated Field…’
  3. Name the Calculated Field “Coffee Sales”
  4. In the formula pane (which should be pre-populated with [Product Type], add the following formula: IIF([Product Type = “Coffee”,[Sales],NULL)
    split-on-dimension-formula-1
  5. Click ‘OK’

You should now have a calculated measure in the Measures shelf called “Coffee Sales”. Repeat the above process for each of the other three values in the ‘Product Type’ dimension (Espresso, Herbal Tea and Tea).

Use ‘Duplicate Measure’ and ‘Edit…’ to speed up the process. All you will need to do is change the targeted Dimension value

Now that we’ve created four measures based on splitting values in the dimension of Product Type, we can create an example Scatter Plot to address the question from above.

On a blank worksheet, drag ‘Coffee Sales’ from the Measures shelf to the column shelf – make sure it is set to ‘Continuous’. Drag ‘Espresso Sales’ to the row shelf and make sure it’s set to ‘Continuous’. You should now have a scatter plot with one mark. Probably, we want more detail than a single mark – try right-mouse clicking the date dimension and dragging it to the ‘Level of Detail’ shelf and select ‘Date (Continuous)’. This ought to give you 24 marks. They probably appear to be tightly grouped with little discernable pattern wise, but let’s work with it for a moment.

image

Try putting ‘Profit’ on the size shelf. Now we get an indication of where the high profit versus low profit intersects are but the data is still highly clustered making pattern recognition difficult.

image

See? Still a jumbled mess, we’re not learning anything yet but this is exploratory analysis so it’s ok! Let’s try putting ‘Market Size’ onto the ‘Shape’ shelf.

image

Ok, so Profit isn’t really telling us anything that we couldn’t have logically concluded from ‘Major’ to ‘Small’ market differences. Let’s create a % Net Margin measure. In this case, be sure to use SUM otherwise the % Margin calculation may have unintended values. The formula should look like this: SUM([Profit]/SUM([Sales]).

image

Still not a lot to see here. What if we drag ‘State’ onto the Color shelf?

image

Now we’re getting somewhere! Adding State-level detail gives us a lot more marks to work with, but the overlapping points are still making it harder to read than is necessary. Let’s make some formatting changes to see if we can make things a little more clear. Start by increasing the transparency of the mark colors – I ended up at about 50% transparent. That definitely helps to see ‘through’ the overlapping points as well as the density of marks. Make sure that the scales on the x and y axes are the same – it’s a scatter plot afterall. I also changed the pane background to black (yes, black) and added light gridlines. In this case, I think both help make discernment easier.

image

Enable highlighting from the Color legend, then you can focus on a particular state in the visualization. Most states exhibit what most of us would be ‘normal’ patterns – either no particular relationship between Coffee and Espresso or as Sales in one grows, so does the other. A couple of outliers though are apparent though. Try selecting Ohio. In the ‘Small’ markets product sales are binary – that is, either Espresso is sold or Coffee is sold but not both. On the other hand, in the Ohio ‘Large’ markets, we revert to one of the ‘normal’ patterns. Now select ‘Massachusetts’. What? There appears to be a downward trend in Espresso sales as Coffee sales increase. This would seem to indicate a more graduated preference pressure on Product Type than we saw in Ohio. Further analysis of Massachusetts would be necessary to understand the graduated sales and if that pressure can be used to improve sales or profits.

image image

Alright, so that’s it. A tutorial on how to create dimension-value specific measures that turned somewhat into a discussion of exploring data to find interesting patterns. All that’s left is the discussion…

FILE ATTACHMENT: Split Dimension Tutorial Packaged Workbook

By: Clint | Posted in Tableau Tips | Tagged: | 3 Comments »
Step Past the “WTF” Adobe-Omniture Moment

September

15

2009

According to Twitter, I had the same immediate reaction to the Adobe Omniture acquisition that just about everyone else had: WTF? How does this make sense. I immediately tweeted that. Ok next time, think before you tweet.

Adobe is more than Flash. Heck, before Adobe acquired Macromedia it wasn’t anything approaching Flash.

Don’t get me wrong, Flash is important. How much of online video is distributed via Flash? A significant majority I imagine. Flash is also used for interactive web pages and light gaming. Oh, it’s also developing into a desktop connected-application platform via Flex.

Integrating Omniture (or any other measurement technology) into Flash or Flex, what’s the difference? There largely isn’t one. And Flex desktop apps are proliferating. How valuable will it be for those developers/companies to have a solved, stable integration of analytics into those apps? And of course, since Flash serves SO MUCH of the video content online, how will Adobe’s acquisition apply pressure to the standards that are used to measure video?

Adobe has not one, but two development and publishing platforms (Dreamweaver (ok, who still uses Dreamweaver?) and Cold Fusion)

What if some of the components of Insight and/or Test & Target are integrated directly into Cold Fusion?

What about Shockwave/Director for rich gaming experiences?

In-game analytics don’t really exist, not on a large scale anyway. What if Adobe-ture can solve that?

And of course the standards: Photoshop, Illustrator, Acrobat.

Holy Crap! Adobe has an end-to-end services & platform suite for developing connected applications, web-sites etc.

With the addition of Omniture to the fold, Adobe can now add adjunct services to their platform.

  • Basic Measurement (Site Catalyst), customized for specific environments
  • Data Integration & Data Mining (via Discover, Insight, etc)
  • Testing & Targeting via –wait for it- Test & Target

And don’t take “adjunct” the wrong way, we all know that the worst kept secret of online is better analysis and synthesis right? The data and the insight they drive are as important as the products/sites/apps that drive the data.

Once you step past the WTF moment, you start to realize that this may be less of an eBay-Skype thing and might just be more of a Google-Applied Semantics kind of thing. It will take careful execution of a well-thought out integration plan but it could be a very interesting play.

What if Adobe dusts off HBX (or offers a trimmed down version of Site Catalyst) for free to publishers (especially video publishers) in return for aggregated and anonymous video usage data? What if they push something like that through partners like BrightCove that provide video players to publishers?

Again, once you move past the shock and think about a bit, this acquisition might just make more sense than you thought, or at least the possible reasons for it begin to emerge.

What do you think? Why did Adobe do this? Why did Josh et. al. agree to it? Are the reasons above worthwhile? Are there other more important factors? Please leave a comment and let me know!

One last random thought, does this help Adobe in positioning against HTML 5? My understanding is limited but it seems to me that the HTML 5 standard is, in some ways, a direct shot at Flash.

BTW, Gary Angel over at SEMPhonic has a very thoughtful post on this deal

By: Clint | Posted in Web Analytics | Tagged: , , | 3 Comments »
Creating A Pseudo Reference Line in Tableau

July

7

2009

One of the weaknesses of Tableau is that you can’t add a reference line to a chart that is based on a custom calculation or another metric within the workbook. The calcs that are offered for reference lines are good and applicable in many situations but sometimes, they are just not right. In the short video below, Joe Mako explains how to fake a custom, dynamic reference in Tableau.

Adding a sudo reference line in Tableau from Joe Mako on Vimeo.

NOTE: Joe directed me to his tutorial after I was asking some questions about reference lines on Twitter yesterday, I’m simply passing along his great little tutorial. Please enjoy!

By: Clint | Posted in Tableau, Tableau Tips | Tagged: , , | 2 Comments »
Sneak Peek! – Tableau Online

April

10

2009

Sneak Peek! Tableau Online Back in January, I published a post on how to create a calendar-based view in Tableau. At the time, I mentioned that it had created some buzz within the halls at Tableau-central and that, in part, lead to an invitation from Christian Chabot, CEO, to participate in a new project they were working on.

Well, here is your first peek at that project – Tableau Online!

Essentially, it will allow anyone with Tableau Desktop to publish their workbook online and embed the visualization in their website.

Tableau Online is currently in private beta, but you can sign up for updates here, or click on the logo below the visualization.

Before we get to the visualization itself, here’s what I’ve learned about the project from Christian and Ellie Fields – Director of Product Marketing.

Christian says that the vision for Tableau Online is for it to be “the YouTube of information visualization…” which I interpret as the platform of choice for publishing rich, interactive visualizations online.
Additionally, during a recent discussion with Ellie Fields, I uncovered some of the more nitty-gritty details…

  1. It currently only works with local data – basically you need an extract from any source locally on your machine in order to use the visualization with Tableau Online (in all likelihood you will upload a packaged workbook)
  2. There have been discussions around an API so that data might be transmitted ‘over-the-wire’, but there are no specific plans for getting that done
  3. This is a very early look, the hardware is still undergoing performance testing so be patient if you get an error with the visualization or it takes a while to load; and hey, leave a comment describing what happened!

What follows is a proof of concept based on the calendar view I had developed.

This calendar specifically, and Tableau Online generally is built on the new version 5 platform (there have been some examples creeping out on the Tableau blog). I’ve been working with the version 5 beta so let me tell you about the features from 5 that are important here. Sheetlinks and highlights have been repackaged – and improved – to a new function called ‘Actions’. In this visualization, the calendar filter for year is also applied to the small multiples sparklines below the calendar. This is now very easy to do compared to how sheet links work in version 4. Also, if you click on any particular day within the calendar, that date is highlighted on the small multiples below – enabling this is as easy as hitting a switch (which is basically what you do).

Many improvements and new options have been added to quick filters – but, so far, the biggest improvement IMHO is the addition of the search feature! (Although I wish that the Tableau team had built in direct feedback for when a search fails)

Here are some of the things you can do in this proof of concept.

  1. Filter on Year for the whole visualization
  2. Select a particular month for the calendar view
  3. Highlight any given day in both the calendar and the small multiples by selecting a day in the calendar (you can also select multiple days)
  4. Highlight a day in the small multiples only by clicking on a plotted point (or drag select multiple days)
  5. Highlight a particular month by selecting the month name in the small multiples column header
  6. Lowlight inactive days in the calendar for a particular product category by selecting the category name in the small multiples row header (you can select multiple categories by selecting one category and then either SHIFT or CTRL clicking another category)



Powered by Tableau

The Tableau team and I have discussed many changes to this visualization, but we weren’t able to get them done in time for this post as each change currently requires extensive testing on the new platform, but those changes should be coming soon. Discussed changes include changing the color encoding to profit instead of total sales, and doing a daily sparkline only for the currently selected month and then bar charts aggregated by month for the rest of the months in the currently selected year.

What else would you change/remove/add to this visualization?

Finally, there will be a smattering of sneak peeks going up across the infoviz community so keep your eye on out here and the Tableau blog as those new visualizations go up!

By: Clint | Posted in sneak peek | Tagged: , , , , | 13 Comments »
Policing the Viz Police

March

23

2009

Tableau SoftwareRecently, Tableau published a well-meaning blog post to highlight some of the inherent problems with geography-based visualizations under their tongue-in-cheek “Viz Police” heading. They take issue with a recent visualization published by Media Cloud, a Harvard Law project, showing how various news outlets cover various countries around the globe. The interactive graphic allows you to choose up to three news organizations and then 3 different data sets to compare (top 10 search terms, top 10 term pivot and world map – the visualization Tableau chooses to discuss).

I don’t necessarily disagree with Tableau’s argument, but I think they made several errors in how they chose to communicate it.

Error #1: Bad Blogging Etiquette: The post provides no link to the Media Cloud project and the specific item under discussion. There is no native way for the reader to go back to Media Cloud and investigate the visualization on their own. I wasn’t familiar with Media Cloud so I actually had to Google it to get there.

Error #2: Poor Graphic Use: Tableau chose to use just a thumbnail (the same thumbnail that is provided by Media Cloud) of the infographic. Furthermore, they covered it up with their “Viz Police” badge making it impossible to get a decent view of the graphic. Finally, the way they incorporated their badge into the Media Cloud graphic (it looks like someone screen-shot a layered graphic out of Photoshop or similar) presupposes the bad nature of the graphic. In other words, poor execution of including the badge on the Media Cloud graphic gives the reader the, possibly false, impression that the map is a bad graphic.

Error #3: Lack of a Full-Size Graphic: Tableau did not provide a full-sized version of the Media Cloud graphic. Now, I run hi-res (1928×1208) so I’d argue that the original graphic is too small anyway. But, when you look at the full-sized graphic sans “Viz Police” badge, the errors are not quite as egregious as indicated by Tableau. In the full-sized graphic the Area-bias still exists, but it’s clear that the UK is more saturated than the U.S. on the BBC graphic – when you spend some time looking at it.

Error #4: Misdirection. In attempting to show how Tableau’s solution (circles vs. density) is better, they bring in a completely different data set – “Net Internal Migration by State”. Now Media Cloud does not provide the data behind their graphic so if you wanted to create a comparative graphic in another tool you’d presumably have to jump through some hoops to either get them to provide the data or to estimate the data, but in either case you are not comparing apples and steel ingots ( apples & oranges are, in fact, too similar for the old adage to work) as Tableau is asking you to do in their post.

Error #5: Using area to encode value. In an error similar to the map-density one they are arguing against, Tabeau’s example uses the area of the circles to encode some value – which is not even explained via a legend (the legend only explains the color encoding)! For those that may not know, we humans are not good at estimating area, it’s not what our visual systems are built to do. We tend to over-estimate large areas and underestimate small areas – remember, this is the basic argument against pie charts.

Error #6: Chart Junk. At best, chart junk obfuscates your data making it difficult to understand. At worst, it causes bias or error in judgment of the data. Well, in the Tableau map, the circles have a light-colored border. This border is more evident on some of the plot points than others, creating the misrepresentation that those points are somehow more important. Is the migration to Maine somehow more important than the migration to Minnesota? I don’t really know because they are roughly the same size and color BUT the border on the Maine circle is much clearer than the one on Minnesota – what does that mean?

Error #7: Breaking map conventions. I can’t speak for the rest of the world, but here in the U.S. a circle on a map generally means a population center – a city – and the size of that circle may indicate how big the city is, or all circles are the same size (e.g. no value encoded on the area). So, when I’m looking at a map like this I/we expect the circles to reference a city and these circles do not, they reference a state – Tableau has just broken your mental model of a map! When you use a convention unconventionally and break the standard mental model you typically end up creating cognitive dissonance. I’m not saying that it should never be done, but you have to be very careful. If the confusion throws something into sharp relief that might otherwise be obscured, ok you’ve got a case to do it, but if all it does is create a buzzing between the ears that makes processing the information more difficult you are better off not doing it.

So what? Why am I all in a huff? It’s not because I dislike Tableau – quite the opposite, I am an avid user. I do dislike poorly executed arguments. If the argument is not made cogently, it has holes in it. It looks sloppy and therefore is less effective. Tableau has an excellent point about the pitfalls of area-based information graphics but they’ve shot themselves in the foot with how they argue it and that makes it less likely their readers will understand and trust the argument which well might lead them to not using the learning in their design efforts.

To be honest, I find the whole argument a bit disingenuous. The post argues against a specific type of area encoding – density encoding on geographic areas but Tableau not only allows area encoding on plot types up to and including the ignoble pie chart but their geographic visualizations allow density encoding via the data layers.

BTW, this is a follow-on to the comment I posted on Tableau’s blog. I wasn’t particularly happy with my comment so I rewrote it as a post here rather than editing the comment there.

Source: Media Cloud A Harvard Law | Berkman Center Project

Source: Media Cloud A Harvard Law | Berkman Center Project

Source: Tableau Software

Source: Tableau Software

Source: Media Cloud a Harvard Law | Berkman Center project

Source: Media Cloud a Harvard Law | Berkman Center project


Source: Tableau

Source: Tableau

By: Clint | Posted in Tableau | Tagged: , , , | 6 Comments »

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »

prednisone buy cod watson brand order prednisone on line buy Crestor cod buy 40 mg accutane online without prescription buy Nizoral Online order generic Crestor cytotec online cheap cytotec from mexico buy Premarin no prescriptions order Valtrex without a prescription overnight shipping Valtrex bestellen purchase 10mg accutane 40 mg overnight delivery buy prednisone without rx needed prednisone without a prescription canadian i need to order prednisone without a prescription prednisone purchase without perscripotion buy synthroid mail buy buy zithromax no scams purchase Crestor overnight purchase Crestor pay pal without rx generic finpecia online finpecia usa order Crestor uk best buy valtrex comprar Crestor generico buy cheap Zithromax order buy Zithromax online where can i purchase Buspar no rx buy Atarax without doctor ordering Atarax without a script purchase Atarax cod overnight delivery purchase Atarax buy Lisinopril in india Lisinopril no doctors prescription purchase Atarax without rx to ship overnight buy Atarax cheap (Metformin espana|purchase Metformin|Metformin ohne rezept|Metformin pills|what is Metformin used for|price of Metformin|best buy Metformin|Metformin preis|medikament Metformin|what does Metformin look like|buy Metformin c o d|Metformin 1000 mg|generic Metformin online|Metformin purchase|best buy Metformin|buy Metformin usa|where to buy Metformin|Metformin rezept|Metformin mexico|buy Metformin with no prescription|buy Metformin canada|where to buy Metformin|buy Metformin cheap without prescription|comprare Metformin generico|discount Metformin|buy Metformin online no rx|Metformin purchase|pharmacy Metformin|comprar Metformin generico|uk Metformin generic|Metformin toronto|pharmacy Metformin|Metformin price|cheap Metformin online|buy Metformin without prescription|buy Metformin where|Metformin online purchase|buy Metformin online|online Metformin|online Metformin purchase|uk order Metformin|how to buy Metformin without a prescription|order Metformin withou buy no perscription Buspar prednisone with out a prescription Metformin fedex shipping Xenical cash on delivery no rx Flomax with fedex purchase Premarin cod overnight delivery generic valtrex new zealand buy Crestor on line online purchase Valtrex no prescription required for prednisone buy Premarin us buy Premarin without a rx buy Maxalt once a day buy prednisone without rx needed buy Proscar offshore no prescription fedex buy Valtrex us discount Orlistat buy Atarax online buy herbal Atarax buy cheap Orlistat line order Orlistat without rx needed accutane without prescriptions Buy xenical online with next day shipping Accutane ordering without a dr purchase Accutane no scams Maxalt on line buy Donepezil and Premarin buy Valtrex on line without a rx buy Valtrex and Valtrex ventolin overnight without prescription buy generic Crestor online purchase online prescription Valacyclovir order overnight Zithromax Amitriptyline by mail Zithromax buy Proscar 5 mg purchase cheap online prednisone uk Prednisone generic Buy xenical online without a prescription Buy xenical online perscription uk order Nizoral Adobe Acrobat X Pro buy cheapest Maxalt and Maxalt buy in Valtrex uk prednisone with no perscription overnight shipping buy Prednisone without a credit card buy Prednisone cheap without prescription Proscar from canada 120 mg xenical xenical online purchase buy prednisone want to buy Maxalt in usa prednisone no prescription with mastercard how to purchase Cytotec online without rx buy Valtrex in mo Valtrex buy prednisone over the counter Xenical best buy i want to buy Atarax without a perscription buy Cytotec no prescription low cost generic Atarax cost Rosuvastatin overnight overnight Atarax c.o.d