Posts Tagged ‘calculated field’

Tableau Candlestick Chart

October 10th, 2013 No comments

Recently I’ve had reason to pay more attention to the stock of who are the company that introduced me to Tableau. They implemented Tableau Server a few years ago while I was in a very small team of analysts working there at the time, enabling me gain the level of expertise I now have. While analysing the performance of their stock I’ve begun to gain a new appreciation for the candlestick chart and thought about creating this chart in Tableau.

I downloaded the daily stock data for the past 2 years from the Nasdaq website and found a very useful tutorial on the Tableau site about how to create a candlestick chart in Tableau. This saved me many hours of working out how to do this and now I’m going to write it up step by step on this site.

The downloaded dataset is very simple, it contains the date, open price, close price, day high, day low and the volume. I added the ticker to this as well, although unnecessary if only looking at one stock. This can be used as a filter should you load a number of different stocks into the same chart. Tableau should automatically assign the correct data type to the dimensions and measures, they should appear as follows:

Read more…

Tableau Dynamic Sorting

May 28th, 2012 19 comments

Recently I created a tabular report where it was a requirement for the user to be able to sort the list by all of the different measure columns. I generally publish my reports on to Tableau Server where sorting is easy by using the Tableau toolbar but I wanted to see how to do this without using the toolbar.

I began to think about ways to do this using parameters and calculated fields as a Dimension has the option of Sort By Field. Luckily I didn’t have to think to hard about how to do this as I stumbled across a blog post which describes how to set up dynamic sorting with Tableau. I slightly modified the more complicated of the 2 techniques described in that article, which I describe here.

For this example I’m going to use the Superstore Sales sample data Tableau provide and create a table showing the Customer State on the rows and the measure values Profit, Profit Ratio and Sales in the columns. If unsure how to do this check my other post on displaying data in tableau as a table. Read more…

Tableau Filter the data on display and not the underlying data

May 16th, 2012 No comments

I was recently set a challenge to filter a chart based on something that happened in the past, but still to show all time periods. The specifics of the task was to look at the number of employees a company had in 2010, and depending on that amount either show or hide all years for those companies that had the right amount of employees. In other words create a ‘Number of employees in 2010’ filter.

The dataset contained only 3 fields, Company, Year and Employees.

Initially it seems simple. Create a calculated field to calculate the number of employees the company had in 2010 and use that as a filter. This is what I did, the field was called [2010 Employee Count] and the formula I used was SUM(IF [Year] = 2010 THEN [Employees] END). Next I had to set up the visualisation to test what I created worked.

I dragged the Year to the columns shelf, Employees to the rows shelf and summed it, the Company to the colour shelf, giving me a line graph with annual employee counts over time split by company. This gives me the following line chart:

Next I tested the filter by dragging the calculated field [2010 Employee Count] to the filter shelf and using the At Least filter to show all companies with over X employees in 2010. This is where it became evident that this wasn’t going to work – the filter affected the entire dataset and not only the selected companies as can be seen below: Read more…

Waterfall Charts in Tableau

March 8th, 2012 No comments

I’ve noticed waterfall charts are becoming quite fashionable now. If you’re not sure why this is used, it’s a great way, for example,  of showing how total revenue is compiled from it’s components. Using the Tableau Gantt Chart it’s quite simple to build. In this article I’ll give a very quick guide to building your own such as the chart below.

Read more…

Improve Your Tableau Dashboard Performance

February 29th, 2012 1 comment

I’ve faced a number of issues recently with Tableau report performance not being as good as required. This article is my attempt to combine the different ways to improve the speed I’ve learnt from other sources. The intention is to update this as I learn new techniques to achieve better performing Tableau reports. Read more…

Tableau Top X values by category

February 1st, 2012 No comments

This had me perplexed for a while but I found a good article on the Tableau site about how to show the Top N values by a category. I wanted to find the top 5 regions for a metric in each category.My data set is very simple, it only has 3 fields, the Category and Region dimensions, and the Metric measure.

The first thing I did was to load the Category and Region dimension on to the Rows shelf and the Metric measure on to the Columns shelf to get a column chart. Next I sorted the Region pill by right clicking on to the pill and selecting the Sort option. Read more…

Using tooltips to show help on a dashboard

January 17th, 2012 2 comments

I’ve seen in a few blog posts’ dashboards that have been published on to Tableau public which contain a relevant logo (i.e. a company logo on a corporate dashboard) over which the user can hover and the Help/Notes section of the dashboard then appears, saving the need for an extra worksheet to display this or the need to take up valuable screen real estate. Read more…

Basic Maps in Tableau

December 23rd, 2011 2 comments

I’ve been meaning to write about the maps in Tableau for some time now as I’m really impressed with how they look, how easy they are to use and how powerful they are as a visual geographic reporting tool.

If you have geographic data, preferably with a longitude and latitude, you can display mapped data in a matter of minutes. Tableau maps allows zooming in and out – although this isn’t the most user friendly when compared to the likes of Google maps. Read more…

Tableau Dynamic Linked Parameters

November 26th, 2011 3 comments

The first thing to tell you is this isn’t possible, one of the few weaknesses in Tableau.

I wanted to set up 2 parameters in Tableau, the first would be a start date, the second an end date. What I wanted to do should be straightforward – to set the values available in the end date based on what was selected in the start date parameter – so the earliest date available in the end date parameter is the same as the value selected in the start date parameter.

The first thing I did was create a calculated field to return values based on the result of the start date parameter – i.e. If  Date >= Start Date parameter Then Date End. I used this calculated field to set the min and max date range in the parameter and thought that would be parameter set up complete. Read more…

SSRS Add Line Feed to Textbox

September 7th, 2011 No comments

To add a line feed to a textbox in SSRS is quite simple – in the textbox expression where you want to add the line feed type: ‘& VbCrLf &’

For example

The expression: =”To add a line feed in SSRS” & VbCrLf & VbCrLf & “Use the VbCrLf function”


‘To add a line feed in SSRS


Use the VbCrLf function’

Categories: SSRS Tags: ,