I have to thank Ben Sullins for this and his post on how to add an All to a parameter in Tableau, finding that article saved me a lot of time.
To begin create the parameter and add an ‘All’ option. Display the parameter on your worksheet.
Next drag the field you want to filter to the filters shelf.
To filter the field using the parameter right click on the field on the filters shelf and select Filter, then Condition.
In the By Formula box enter the following formula:
IFNULL([FilterField],’Null’) = IF [Paramter] != ‘All’ THEN [Paramter] ELSE IFNULL([FilterField],’Null’) END
How does this formula work? Read more…
To remove the All option from a Tableau autofilter is possible by following these simple steps:
1. Click the small down arrow in the autofilter heading
2. Scroll down to Customize
3. Uncheck where it says ‘Show “All” Value’ so there’s no longer a tick mark against it.
To show the All option follow steps 1 and 2, and in step 3 check the ‘Show “All” Value’ so the tick mark appears against it, as in the diagram below.
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…
I’ve had some questions recently about hiding Nulls in a filter in Tableau. This is quite straightforward and the same technique can be used to hide any value from a filter.
NOTE – if using this technique it actually removed what you’ve hidden from the filter from the worksheet.
All you need to do is duplicate the field being used as the filter, put the duplicate field on to the filter shelf, select the values you want to hide – i.e. Null – and click exclude on the right of the filter box. Read more…
If using Tableau Server it’s possible to pass parameters to filter your dashboard via the URL. It’s very straightforward and detailed in this post on the Tableau Forums. Basically just get the URL to access the dashboard on the server, add a ? at the end, which is how parameters are entered in a URL. After the ? put either the name of the parameter or the name of the field being filtered, =, and then the value.
For example if you want to filter/pass an email address parameter – field/parameter name being EmailAddress – your URL would be as follows: http://ServerName/views/WorkbookName/ViewName?EmailAddressemail@example.com
Note this is case sensitive so make sure this is taken into account. To add additional parameters add an ampersand (&) to the end of the URL for each parameter/filter and the same Name=Value syntax.
Depending on the circumstances there are 2 general ways to hide Null values in Tableau.
1. Format the pill and hide the null values
Hide Nulls in Tableau
Select Hide in the Special Values section of the pane. For further explanation I have written about this previously.
2. Drag the pill into the filter section and hide null values using the Special section. Read more…
This post is a continuation of part 1 on how to create the Oniture visits report in Tableau. Click here to go back to part 1
This is the chart we are trying to create, the same as the Omniture calendar month visits report.
Now we can begin to create the chart. Drag the Day pill to the Columns shelf and the calculated field SelectedMonthVisits on to the Rows shelf. Make sure the Day pill is displaying the DAY(Day). Read more…
To recreate the Omniture visits report in Tableau was quite difficult so I’ve broken the post into 2 parts. The result will be published on Tableau Public and I’ll supply the link to the report at the end of the post.
I spent some time recently trying to replicate web traffic visit data from Google Analytics in the style of the Omniture visits report. I like the Omniture visits report as it shows how you’re tracking in the current month vs how you were tracking exactly 4 weeks earlier – i.e. compares Monday with Monday, Friday with Friday, etc. It also shows how you were performing vs last year. Read more…
Categories: Tableau, Web Analytics calculated field, DateAdd, filter, google analytics, Omniture, parameter, reporting, sql, tableau, Web analytics
Often in tableau you’ll find you need a filter that’s neither local of global, you will want a dashboard level filter. On a dashboard local filters are often too restrictive as they only alter 1 part of the dashboard, and to have 2 identical local filters on a dashboard also isn’t a valid option. To overcome that problem filters can also be global. This also comes with problems every worksheet from that data source is also forced to share that filter when you often don’t want to.
Currently there isn’t a dashboard level filter – i.e. a filter that’s local to everything on the dashboard only without affecting any other dashboards created from the same data source. Read more…
It’s possible using a combination of parameters, filters and calculated fields to create complex and advanced date filters in Tableau.
Say you want to see some a time period based upon a user selected time period. You can create a calculated field which will return a result based on what the user selected.
For this example you want the user to select a month, but you want to display results showing data from the month before the user selected month as well the selected month – i.e. the user selects Apr and you also need to display Mar as displayed in the visualisation.
This wouldn’t work with a standard filter, the user would need to select the months they were interested in one by one. Using a parameter and a calculated field is the way around this. Read more…