In this post, we will see how to plot candlestick chart in Tableau. We will use the same dataset which we used in previous article on stock analysis – using LOD function.

Here is the final candlestick dashboard for stocks:

Below are the steps to create:

Step 1: Import the stock prices into Tableau which I have in following format.

We will create first 2 calculated fields i.e. closeopendiff and highopendiff formula given below:

Step 2: Drag Low and Open in the row tab (covert into avg) and make avg(open) into dual axis

Step 3: Edit both the axis and uncheck the include zero checkbox

Step 4: Under tab of Marks, change the automatic to Gann chart for All option. Then under avg(low) in marks tab, drag highlowdiff field into size and make it slim as shown in below image

Step 5: Similarly, drag closeopendiff into avg(open) in marks tab into size and make it thick as shown in below image.

Step 6: Drag actual date from dimension and put into column then right click to change the setting to day as shown below

Step 7: Create one more calculated field to allocate color based on open and close

Step 8: Drag color to avg(open) in marks and put onto color to allocate green for True value and red for False value

Now your candlestick graph is ready to use. you can use date filter to play around with different dates and see the candlestick graphs for different stocks.

Comments and feedback are welcomed!!!

Do subscribe to my blog to keep receiving new posts 🙂

Recently, Tableau 10.5 was released by Tableau with Hyper technology (which Tableau says it will extract data faster and enhance query performance) and viz in tooltip which is something really exciting.

How to add viz to tooltip in Tableau:

Lets consider superstore data source for this example and import the same file into Tableau

Step 1: Create your main sheet of visualization:

For the first worksheet, we will create state wise distribution with Parameter of Sales and Profit. I have created an calculated field called option using following calculation:

Post this step I created following sheet:

Step 2: Create the visualization that you would like to see in tooltip:

Now we will create an new sheet with visualization which we would like to see when we hover over states in the main sheet. Lets say I would like to see month wise sales/profit, category wise sales/profit and top 5 sub-category sales/profit in the tooltip. Below images for reference of month wise sales:

Step 3: Add the visualization sheets into the main visualization:

Now lets go back to main visualization and add the tooltip viz into main sheet. Normally, we click on tooltip and add textual stuff or dynamic text over there to see on hover. For this, we will add the secondary sheets into tooltip as shown below:

I modified to add 2 more dashboards and it looked like this:

After adding the required tooltip viz, now if we hover over state (I did on New York) we will see the tooltip viz of month wise sales/profit, category wise sales/profit and top 5 sub-categories:

 

Additionally if you want to modify the height or width of tooltip it can be easily done by changing the maxwidth or maxheight of tableau added tooltip viz (eg: <Sheet name=”Monthwise” maxwidth=”470″ maxheight=”100″ filter=”<All Fields>”> )

Finally, data will be seen in one single dashboard rather going into different sheets or creating different dashboard to display numbers. Final dashboard which I created is shared below:

Do let me know your feedback or if you have any queries.

Thanks!!!

Today we are going see use of polygon and points in Tableau to create an map showing an geographical details. Tableau has out of the box visualization of geographic regions such as countries, zip code, states and it is pretty much simple by simple drag and drop into sheet with geocoding fields in data source.

Now, what if we need to see customize location in the map or geographical boundaries across across different suburbs or need to see municipal map of particular city with different sub-wards. Tableau for that purpose has polygons which can be used for drawing an particular spot but this required a bit of work before we start using it. This collecting of data with all the points might be time consuming process.

Lets get started with this:

Custom polygon has 2 requirements:

1 – Latitude and longitude coordinates for each point of polygon

2 – An point order in which points are connected with each other

For this dashboard, we will create Mumbai map on basis of municipality wards and I found that data from json file here and converted that into an excel spreadsheet. Once you have data arranged in below format, Tableau will connect the points with the help of longitude and latitude information:

once your data is ready with wards,points, longitude and latitude then import the data into Tableau then do following steps:

  • Place longitude and latitude on rows and columns respectively
  • change mark type to polygon
  • Convert points into dimension then place points column into path under mark
  • Final step is to place ward column into colours under mark

Your polygon map is ready for Mumbai with different Ward with its boundaries as shown below:

Next I did was to get 2011 census data of Mumbai population and create different sheets to create dashboard which shows population, literacy and working class for each ward.

Here is the final dashboard that I designed and published:

Do let me know your feedback or if you have any queries on the same.