background preloader

Filters

Facebook Twitter

Automatically show latest data with simple user... Description: In the past I would approach this problem by creating a few parameters and some calculated fields that allowed the user to which between relative filter that showed the latest data or a user specified date. An example is my key hospital statistics dashboard that displays FYTD or MTD data through the latest date, or through a user specified date. It required me to create a parameter that would be used to determine if the date should be overridden. I always thought this was a little cumbersome and required too many clicks. The trick is to set the date filter to run on the top 1 maximum date. So what happens is that the action filter passes a single (or multiple) dates to the bar chart, which limits the dates available to the "top" filter. Screenshot: Tableau Version: 8.0 Original Author: Mark Jackson.

Tableau Tip: Showing all dates on a date filter after a Server refresh. As I was preparing for my trip to Israel, the team posed an excellent question: Why doesn’t the date slider quick filter automatically show the latest date when the data is refreshed on Server? I saw on this thread that it’s still an unsolved problem. In a nutshell, here’s a summary of the problem:You created a dashboard that has a date slider quick filter and you’ve told Tableau to use all dates. The next day when the data source refreshes, the quick filter doesn’t automatically include the new date(s). The slider has to be manually moved to the right to accommodate for the new data. Let me first explain the problem in a bit more detail. And you built a cool dashboard with a date slider like this: You publish the dashboard to Tableau Server and set the data source to refresh each night.

You can clearly see that four more days should be included, but the slider is still stopped at January 10th. That leaves you with two options, both of which are not satisfactory: Filtering in secondary data source removing fie... | Tableau Support Community. I want to show latest month in quick filters by... | Tableau Support Community. Tableau Tips,Tricks,Best Practices - Sort/Filter - Jenny (Xiao) Zhang. Cascading Quick Filters in Tableau. Overview This blog post is going to cover both the basics of quick filters as well as trying to push the boundaries, so if you know the basics, feel free to skip down to the later examples!

Quick Filters refresh Before I get into the ins-and-outs of cascading quick filters, I should probably put a quick explanation of what a “Quick Filter” is. What Tableau defines as a Quick Filter is just a specific visual object for allowing easy alteration of filters on the visualisation. The visual appearance can be altered if desired, and the quick filter can be surfaced on a dashboard to allow an end user to dynamically alter the filter, making a single dashboard the equivalent of many static ones.

“Cascading” filters? Cascading (or hierarchical) filters are ones where the selection on the first filter causes the second to be limited to only those values that are now relevant. Note, I will not be discussing the effect of quick filters on performance in this post Linking 2 quick filters in Tableau. Paint By Numbers: A Rough Guide to Tableau Dashboard Actions. As you probably can tell by now, I really enjoying building data visualisations in Tableau.

Whether for this blog or for work, I strive to build dashboards that people will be able to use to explore the data at their own pace and discover their own insights. One way I attempt to do this is by using, what I hope is, engaging visual design. The other is by building in interactive features into the dashboard that people can play with to start changing the views of the data. This is accomplished in three primary ways: Quick Filters, Parameters and Dashboard Actions. What is a Dashboard Action? A dashboard action is an interactive element on a Tableau dashboard that is driven from the worksheets within that dashboard. Tableau themselves provide a good run down of how to build in Dashboard Actions here Use Case 1: Basic Chart to Chart Filtering Method 1: Use As Filter Note what's being shown here. Got that? Question on how to create a product velocity ca... Here is my current working guess on an order of filter evaluation: 1.

Context Filters - temp table in data source, always evaluated first - Note that if you have a calcuated field that is dependant on a parameter in use as a context filter, changing the parameter value will not cause a regeneration of this temp table. 2. Top and Condition Filters - In the filter dialog for discrete dimension pills (blue pill, non-agg), you have two tabs for Top and Condition. When these are set, they will generate a sub query and join with the data before the where clause is evaluated. 3. . - Note that your non-aggregateion calcuation formulas will be evaluated before this point, so you could consider it filtering with a IF statement in a formula that will be evaluated before these normal and context filters. 4. 5. 6. 7.

This is my current understanding, and I welcome your corrections if I am incorrect in any of these points. Syncing a Quick Filter with a Dashboard Filter Action. On a dashboard you create, suppose you want to filter across all views, where the filtering affects only that dashboard, and not other views in the workbook that use the data source. To do this, you can set a filter action on one of the views in the dashboard.

However, suppose you also want to show a quick filter, and the quick filter and filter action apply to the same dimension. In this scenario, using the filter action works to affect the other views, but using the quick filter does not affect the view on which you set the filter action. If you change selections on the quick filter, the view can become out of sync, or perhaps show no data if the action and the quick filter selections conflict with one another. For example, the view shown in the following image is from the attached Tableau workbook, Sync_Actions_QuickFilters.twbx.

As you can see, although the bar and line charts accurately reflect what is set on the quick filter, the map view is out of sync. Step 1 Step 2 Step 3 Step 4 Step 5. Retaining Quick Filter Options when Replacing D... Credit goes to Sam Bruce for posting this workaround at the thread above. I have been moving some workbooks from embedded extracts to published data sources on Tableau Server. Upon converting to Published Data Sources, I noticed all quick filters would default to multi-select lists on every dashboard except the first.

As a workaround/fix, I found the above thread, which stated that if you click on each sheet before publishing your data source, and then replace your data source, all quick filters will retain their respective options, etc. Very nice! Thanks Sam! 2/28/14 UPDATE: This issue appears to apply to any scenario that involves replacing a data source. More info here--Credit goes to Shawn Wallwork for testing this on another scenario: Edit Connection Empty Filter Issue... Syncing a Quick Filter with a Dashboard Filter Action. Cascading Quick Filters in Tableau - The Information Lab. Tip0911.pdf. Question on how to create a product velocity ca. Here is my current working guess on an order of filter evaluation: 1. Context Filters - temp table in data source, always evaluated first - Note that if you have a calcuated field that is dependant on a parameter in use as a context filter, changing the parameter value will not cause a regeneration of this temp table. 2.

Top and Condition Filters - In the filter dialog for discrete dimension pills (blue pill, non-agg), you have two tabs for Top and Condition. When these are set, they will generate a sub query and join with the data before the where clause is evaluated. 3. . - Note that your non-aggregateion calcuation formulas will be evaluated before this point, so you could consider it filtering with a IF statement in a formula that will be evaluated before these normal and context filters. 4. 5. 6. 7. This is my current understanding, and I welcome your corrections if I am incorrect in any of these points. Identifying (and Using) Quick Filter Selection Status. This post on the Tableau forums led me to figure out a new trick with Quick Filters.

The goal is to know whether a Quick Filter has (All) Customers selected or some subset of Customers, then return a different measure based on that flag. Just to make it a little more fun, we want this calculation to work when there are other filters present, or not, to look something like the following view based on the Superstore Sales data: Tableau does not give us visibility into the Quick Filter status, however for discrete dimensions we can deduce that via other calculations.

The method I came up with looks at how many members of the dimension are remaining, i.e. how many Customers have been selected, and compares that to the total number of customers. If the two numbers are the same then (All) customers must be selected, and with that information then we can choose which measure to present. For this example, the Quick Filter is on Customer, a discrete dimension. This is a nested table calculation. Tableau Security. Unfortunately, Tableau's KB on row level security does not touch on how to solve your particular scenario. I run in to this a lot and it's solution varies depending on the details. First thing: If you can get your security definition out of excel and into a table that lies in on the same server as your data, you'll be much better off. (unless your dataset is very large with a large set of users, but I'll get to that further down in my explanation) You would just join to this table ex: a.field1, a.field2, a.field3, b.username FROM datatable a JOIN securitytable b ON a.store = b.store You'd then add a calculation in Tableau of: username() = [username] add this as a datasource filter and set to true.

(like described in Matthew's link above) The above works for reasonably sized data sources but you'll need to understand the effects of the cartesian product you're creating. Another way to approach this is through blending. Then create a relationship between the two datasources on "store"="store". User Filters and Row Level Security. When you share workbooks with others using Tableau Server, by default they can access all the data shown in the views. Alternatively, you can create filters to limit the data that any given person can see. For example, in a sales report that gets shared with regional managers, you may want to allow only the western regional manager to see the western sales, the eastern regional manager to see the eastern sales, and so on. Rather than create a separate view for each manager, you can define a user filter or row-level security that allows each manager to see only the data for a particular region.

There are two approaches to row level security with Tableau: Manually: You can manually create user filters that define the specific data each user can access. Create user filters manually Follow the steps below to create user filters manually in Tableau Desktop. Notes: The steps below describe an installation of Tableau Server that uses the built-in local authentication instead of Active Directory.