1. The Problem

    Following a question in Tableau Forum, I provided a solution.

    The problem can be stated as follows:

    Given a number of devices operating during a day, the requirement is to count the number of devices per amount of total time in operation. The question is like, how many devices operated below 10 minutes a day? how many 10-20 minutes? etc.

    Wondering if there are solutions to similar problems, I googled and found that it's a fairly common problem as stated in:
    http://www.theinformationlab.co.uk/2013/06/24/histograms-on-aggregate-measures/
    http://community.tableau.com/thread/139950

    where solutions are also provided. They are all using table calculations.

    I have to admit that table calculation is one of the most dreaded functions in Tableau. Otherwise the most.

    The Solution

    Luckily I figured out a solution without table calc and I will present the steps here to build the histograms. I will use the same superstore data as in the Information Lab blog where we will count the number of unique customers per number of orders.

    1.Drag Sum(Number of Records) to Rows shelf and turn it into discrete.
    2.Drag [Customer Name] to Details shelf, a dimension needed to count the number of orders per customer.
    3.Right-click and drag [Customer Name] to Columns shelf. Select CNTD().

    Here is what we got:


    We are almost done with the histograms, aren't we?

    OK, we need to clean up a bit so that we have solid color bars and labels.

    Clean up

    The bars are built with many tiny bricks, each representing a customer. We need to remove those border lines between the bricks. The removal is simple:

    - Click Color shelf and change the border option to None.

    We got solid color bars!


    To add labels, we will use reference lines on the horizontal axis.

    - Select Per Cell option, Value type label, and no Line.

    The histogram graph is as beautiful as it can be.


    Binning the Aggregate: Sum(Number of Records)

    We have yet to group Sum(Number of Records) into bins. This can be done through a calculated field [Number of Records Bins]:

    Drag this new field to replace Sum(Number of Records) in rows shelf and we get:


    To be a little cleaner, I removed all the row and column dividers through formatting. The workbook can be found here.




    5

    View comments

  2. In Tableau forum, Danny Lee asked a question: How to blend two data sources, Salesforce and Amazon RedShift by country?  The blending request sounds reasonable. What's problem?

    The problem is that the countries are in different notations: One is in short format, and the other is in long format.

    Say, one is like this:

    Country_Short
    US
    UK
    CN
    FR

    The other is like:

    Country
    United States of America
    United Kingdom
    France
    People's Republic of China

    How to blend them? Are they blendable at all? The answer is affirmative, not without a little twist though. I am listing two ways of doing it. Assume both data sources are connected.

    1. Create a calculated field [Country] based on [Country_Short]:

    Using this newly created dimension [Country], you can blend with the other data source.

    2. Add an alias to each country in the [Country] list of the second source.

    - open a fresh worksheet
    - drag [Country] to the row shelf
    - right click on each country and click the last item of the context menu which is Edit Alias
    - edit the alias of 'United States of America' to be US and so on
    - make sure all the aliases are the corresponding names in the other table.

    Either of the above lays the ground for blending the two data sources. We are ready to blend.

    To blend naturally, rename the two country dimensions to be exactly the same. Tableau will try to link up the two dimensions automatically through intelligent guess.

    If you want to keep the dimension names different and still want to blend the two tables,
    - open menu Data>Edit Relationships
    - link up the two dimensions there, using custom method to join the two data sources.

    Note that for some data sources such as published data extracts, you are not allowed to edit aliases. Quite a weird restriction. The workaround is to duplicate the dimension in question, and work on the duplicate.

    You may also right-click any dimension to edit the aliases for the whole filed.
    In Tableau Desktop 8: Right-click Dimension>Default Properties>Aliases...
    In Tableau Desktop 9: Right-click Dimension>Aliases...

    The end.





    0

    Add a comment

  3. One of my articles Embed Youtube in Tableau with Full Screen:
    http://vizdiff.blogspot.com/2015/01/embed-youtube-in-tableau-with-full.html

    is selected as the Best of Tableau Web January 2015:
    http://www.tableau.com/about/blog/2015/2/best-tableau-web-january-2015-36436

    Thanks to the Tableau Community for the encouragement!
    0

    Add a comment

  4. The Good

    Publishing data sources to the server allows us to

    - Centralize data sources (much like a data mart)
    - Share them with all the authenticated users
    - Reduce workbook sizes
    - Increase workbook publishing/upload speed
    - Schedule data refresh with fixed frequency

    The Insufficient

    However,the published data sources are not so easy to use. A number of product defects or design oversights could have hindered the adoption of server-based data sources.

    - Switching to server data sources breaks a workbook in many ways.

    Many of us start designing vizzes using a file-based data source. In the end we replace it by its server image. Then everything breaks.

    - Unable to change data types in data sources

    It feels like a given that we can convert the data type of any dimension or measure. If a dimension or measure is from a server data source, we can't convert its data type. Not sure why this happens. The conversion is part of the application or the workbook. It shouldn't have anything to do with the data source.

    - Incomplete property information

    We may have multiple data sources of the same name across sites, projects and owners. However we don't see them in data source properties. And we don't see the last update time. So, we may not uniquely identify a server data source and don't know when it is updated.

    - No access to data sources from different sites on the same server

    A Tableau server is organized as site > project > owner > file. Each site has its own collection of data sources. They all share a single sign-on through the Tableau server. From one workbook, however, we are not allowed to access sources of different sites. To us, a site is just a partition of a specific function, such as development, QA, production etc. A workbook is limited to accessing a single Tableau server and data sources from a single site therein. We hope that this limitation can be lifted. This issue should be fixed using permission settings.

    Summary

    Server based data sources are great in many aspects. We would love to use them as much as possible. However its design leaves much to be desired. It seems to hamper the adoption and the deployment of server data sources. We hope that these defects can be fixed soon.


    7

    View comments

  5. Tableau Online is a cloud service for data visualization by Tableau Software. According to this article:
    http://kb.tableau.com/articles/howto/live-data-connection-ip-addresses
    it shows that Tableau Online's IP range is 66.35.252.0-24

    Click the link Online Visual Traceroute and at the bottom, you will see where it is pointing to. It ends up at google.com.  You can test any IP from the above range at http://www.monitis.com/

    So it is hosted by Google. All Google properties, such as Youtube, Blogspot (including this blog), are blocked by China indefinitely.


    0

    Add a comment

  6. Alteryx is a very cool ETL tool, the new kid in the block. New to me alone maybe. In combination with Tableau, it can help us streamline our data workflow and automate data visualization, especially for up to date monitoring.

    We build Alteryx modules to extract data from database into .tde files (Tableau Data Extract file format), which are similar to data marts. Then those modules are scheduled to run daily and overwrite the old .tde files. These files are then published to Tableau server for analytic consumption.

    There are two ways of publishing tde files to Tableau server: Pull or Push.

    1. The Pull approach

    The entire operation is from Tableau Desktop:

    - Open the .tde file from a fresh Tableau Desktop
    - Edit the data source so that the file path is in absolute UNC form (\\computer\directory\file) by which Tableau server can find it.
    - (Extra) Edit data types and change measures to dimensions or the other way around.
    - Extract the data again and save the resulting .tde file somewhere.
    - Publish the extract to the server and schedule refresh options.

    So the result is that the Tableau Server will retrieve the original .tde file at scheduled time. Thus the pull approach. In this approach, Tableau refresh cycle is decoupled from that of the Alteryx schedule.

    Note that once a data source is published, you will not be allowed to change those data attributes by the Tableau Desktop, unless you re-extract it, touch it and republish it. This is the reason for which there is an extra step above. I think this is a design oversight from Tableau.

    The main advantage of this approach is that you can do data type/dimension editing from Tableau before publishing.

    2.The Push approach

    The entire operation is from Alteryx Designer.

    There needs to install Tableau publishing tools (from the Information Lab) first into your Alteryx Designer. Then add it to the Alteryx module, and specify the Tableau server address and login credentials. The newly generated .tde files are thus pushed to the Tableau Server every time you run the Alteryx module.

    Note that it is a good idea to fix all the data types in Alteryx, because once published, users have to change them manually in Tableau.

    See this awesome video by the Information Lab:
    Have fun!
    2

    View comments

  7. Dual axis is a great yet succinct way of showing two sets of measures in contrasting or complementary styles. It is a must have in our viz design arsenal.

    I noticed sometimes one may choose to use dual axis while it is not necessary. Here I try to share some thoughts about when to dual axis and when not to.

    When not to dual axis

    When needing to display two measures in the same chart, intuitively one starts using dual axis. Actually it is possible to display multiple measures using a single axis instead of dual:

    Solution 1: Drag measures to one axis
    http://onlinehelp.tableau.com/current/pro/online/mac/en-us/tips_multiplemeasures.html

    Solution 2: The first solution is quick if you happened to have learnt to do so. For some of us, we may like to do it in logical steps:
    - Step 1. Drag the Date dimension to column
    - Step 2. Drag Measure Names to filter shelf and in the filter options, pick the measures you want to display
    - Step 3. Drag Measure Values to row (you see a single line)
    - Step 4. Drag Measure Names to Color shelf (you see one line per measure)



    Now it's done. Note that there is a Measure Values shelf appeared after you put it in row. You can drag more measures to the shelf if you want to display more.

    It is similar to the method in the article below, and a little different.
    http://kb.tableausoftware.com/articles/knowledgebase/dynamicmeasures

    When using a single axis, you are supposed to display all measures in a single chart type.

    When to dual axis

    The most likely usage of dual axis is for the purpose of displaying 2 groups of measures in 2 contrasting or complementary chart types. Thus, it is good to remember

    Dual Axis = Dual Chart Types

    Below is a chart mixing bar and line comparing sales and running totals (Pareto analysis) based on a single measure. It shows that the top 4 products account for 50% of total sales.



    Because each chart type may have subtypes due to different settings, for example wide bars and narrow bars in the same chart, dual axis may be used to mix two subtypes of one same major chart type.

    There are 11 major chart types in Tableau:


    So theoretically there are 12x11/2 = 66 crossbred chart types using dual axis.

    Caveat for Synchronizing Axis

    Sometimes you may not be able to synchronize measures of Integer type. Converting your measures to float can solve the problem. Just use a calculated field:
    float([Measure]) 
    instead of using [Measure] directly.

    Dual axis examples

    People are getting creative using dual axis to create great visualizations. Dual axis opens a much uncharted territory in viz design. Here I found a plethora of dual axis designs.

    - Bar + Line: it's classic
    http://drawingwithnumbers.artisart.org/bars-and-lines/

    - Map + Pie
    http://kb.tableausoftware.com/articles/knowledgebase/creating-filled-maps-pie-charts

    - Bar + Circle: Lollipop chart
    http://gravyanecdote.com/andy-cotgreave/lollipop-charts/

    - Line + Line: Slope chart
    http://gravyanecdote.com/tableau/how-to-make-a-slope-chart-in-tableau/

    - Filled Map + Circle
    http://www.tableau.com/public/blog/2014/04/dual-axis-maps-2427

    - Gantt + Gantt
    http://wannabedatarockstar.blogspot.com/2014/05/dual-axis-gantt-chart.html

    - Pie + Pie: Donut chart
    http://vizwiz.blogspot.com/2014/12/donutcharts.html

    - Polygon + Circle
    http://blog.databender.net/2014/06/23/points-and-polygons/

    - Gantt + Circle: Equiplot
    http://healthintelligence.drupalgardens.com/content/equiplot-chart-display-equity-data

    - Stacked Bars + Circle: Likert Scales chart
    http://www.datarevelations.com/likert-scale-nirvana.html

    - (Bar or Line) + Shape: Fun chart
    http://www.datarevelations.com/was-stephen-few-right-my-problems-with-a-companys-iron-viz-competition.html

    Drop me line if you know a cool dual axis viz. I'd love to know.
    3

    View comments

Blog Archive
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.