Posts Tagged ‘DateName’

Date Hierarchies in Tableau

May 31st, 2012 10 comments

I recently had a request from someone who wanted to be able to drill into their data both from Year – Month- Day AND Year – Week – Day. The first of these is very simple as it’s more or less a Tableau default hierarchy from any date field, although the default also includes quarter (Year – Quarter – Month – Day is the default).

Adding Week into this adds a significant degree of complexity for the simple reason that weeks generally don’t span months in a neat way – i.e. it’s only on very rare occasions that the first of the month is also the first day of the week and the last day of the month is the last day of the week. Almost always the end of a month and the beginning of the next will be in the same week number – in other words some weeks will span 2 months.

The first challenge is to create the Year – Week – Day drilldown. To do this a hierarchy actually has to be manually built. In a previous post I described how to build a hierarchy. Making use of calculated fields it’s possible to build on the hierarchy concept to build a Year – Week – Day date hierarchy. Read more…

Tableau Server Parameter as a Month Filter

In a previous post about dashboard level filtering in Tableau I used an example of creating a month parameter to act as the filter. For this post to make sense please reference the previous post at the link.

The parameter worked perfectly in production, in the Tableau software, but when published on the server for some reason it didn’t work. It might have something to do with me being in the UK and the server I use in the US and the dates aren’t compatible, US being mm/dd/yy and the UK using dd/mm/yy – but I don’t know if this really is the problem or whether it could be that the parameter set up as a ‘Date and time’ appears to Tableau server as a text field because of the date formatting. In the example I format the date to display as the month name. (Custom format = mmmm gives a date format of January, February, March, etc.) Read more…