Tableau Add Comments to Calculated Field

2011-05-28T10:25:25+00:00 May 28th, 2011|Tableau|

It is likely you will create some quite long and advanced calculated fields at some point while using Tableau which also means you will need to add comments to a calculated field. If like me it takes you more time to decipher what the calculated field actually does when you revisit it some time after [...]

SQL First Day of Month

2018-05-07T20:02:52+00:00 May 19th, 2011|SQL|

This post describes how to find the first day of a month in SQL. The code is: DATEADD(mm,DATEDIFF(mm,0,DateToRemoveTime),0) A full explanation of how this works is in a previous post describing how to remove the time portion of a datetime in SQL as the concept is exactly the same except where removing the time uses the [...]

Tableau Format Month

2011-05-18T15:25:23+00:00 May 18th, 2011|Tableau|

Often space is limited on a dashboard so you need to save as much as possible. One place where Tableau wastes a lot of space is with displaying months. On a chart showing trends over time with months on the X axis having every month displayed with it’s full name  – i.e. January, February…December takes [...]

Tableau Year on Year calculation

2011-05-11T12:43:02+00:00 May 11th, 2011|Tableau|

Tableau makes it so easy to do a year on year calculation. It’s a built in Quick Table Calculation. I’ll quickly run through how to do this. Set up a line chart with time (months is what I’ll be using in this example as it’s the most commonly used and easy to visualise) on the [...]

Tableau hiding null values in line chart

2018-05-08T19:33:20+00:00 May 10th, 2011|Tableau|

You might notice that Tableau assigns null data values in a line chart with a value of 0 (zero) on the X axis. For example you’re trending this year and the previous years data for sales (or whatever metric) with the months on the X axis and the sales on the Y. If it’s mid [...]

SQL Calculating the row number

2011-05-07T11:58:46+00:00 May 7th, 2011|SQL|

To count the row number in SQL there's a useful little in built SQL function you need to use, row_number() This enables you to number all rows and restart the row numbering part way a dataset. Note this is different to the SQL rank function. This is a very useful thing is you want to [...]