Data Visualisation for Non-Noobs: Improving the Hierarchy – Using JavaScript API to feed a click action into a parameter control This blog is based on a project we did with BCG, where we were asked to improve the hierarchy function in Tableau. At first I was a little confused, as the drill down function in hierarchies works pretty well in Tableau, although, it is true that sometimes, you want only want to drill from, for example, one country to the states within it, without having to see the breakdown of all of the countries. After much playing around in Tableau, I realised that really the best way to go about this problem, is using a parameter, as shown below. Here is the calculation you need to build the parameter: However, what we really want, is to be able to click on one region to expand it and not have to go and look for the parameter control. So what we need to do is get tableau to recognise the click as the parameter control. To do this, you need to use a JavaScript API. Step 1: build your viz with the parameter control. This needs to be hosted on a server.

Recent Posts

Leave a Comment