Sunday, February 14, 2016

Lookup, YoY, Charts in Tableau


Last week's #makeovermonday challenge was the first one I really took. Though I had been meaning to participate, work (both professional and personal) did not leave me with enough spare time.

Better late than never, I would say to myself!

Last week's challenge was taken from this article in Business Insider which states that Travel Agents have become a thing of past and ponders whether Online Hotel Industry would see the same fate.

The original visualization looks something like this:


While this chart does show the trend, I find it a little confusing.
For one, the alignment of the legend and the axes seem to be misplaced. Secondly, I believe, we could choose colors which have a higher contrast.

Here, instead of showing absolute value, I am showing the percentage contribution to the total number. This helps me see that the yearly contribution to the total number keeps on decreasing for number of travel agents while it keeps on increasing for online hotel revenue.



I have used WINDOW_SUM() to calculate the total revenue and total number of travel agents for the years in view. Since we are not using any filters, this function will help to find yearly contribution.




Next, let us see the YoY change for both number of travel agents and online hotel revenue.


The number of travel agents trickles down gradually. We can see distinct drop in online hotel revenue in 2009. But it also picks up in 2010. However, we do see a downtrend in the growth of online revenue.

The YoY was calculated using LOOKUP function in tableau, which gives the value at the nth previous row, n being the index. Since we were interested in the previous year's revenue, the index here is -1.



You can find the complete workbook here. Hope this post was helpful!



No comments:

Post a Comment