3

I'm wondering if something like this is possible.

Assume I have a data table like this:

enter image description here

I want a filter, where user picks France for example, but the data is filtered based on corresponding Continent value, e.g., all Europe records should show up.

Is this possible?

Baykal
  • 569
  • 2
  • 10
  • 15

1 Answers1

6

Sure, We can do that. If you add country to Filters shelf, Tableau will show only records of selected value. In our case, if we filter "France", Tableau shows only records which has France. So we will miss other Europe records. Parameter can handle this scenario. Follow below steps.

1.Create a String parameter

enter image description here

2. Create a calculated field

enter image description here

3. Add the created calculated field to Filters shelf then choose 'show'

enter image description here

4. Right click parameter then 'Show parameter control'. So it will works like filter

enter image description here

Method 2: Dynamically change parameter value

Pros: No hard coding, dynamically changes value based on selection. It works, well on dashboard Cons: You will not have drop down for selection like filter. So, you need to click a chart to trigger the changes.

1. Create a String parameter with allowable values as 'ALL'

enter image description here

2.Create a calculated field

enter image description here

3.Create a parameter action in dashboard.

Dashboard-> Actions-> Add Action -> Change Parameter In Change Parameter dialogue box, set target parameter as 'Parameter Name' and value field as 'Continent'

enter image description here

4. Add the calculated field to filter and select 'True' on other sheets

5. Final Dashboard looks like

Click the icon on the selector sheet. It will automatically filter data on data sheet. enter image description here

Inside the selector sheet enter image description here

Shriram R S
  • 126
  • 4
  • Wow thanks for the detailed answer. That's quite a solution to this problem. Can you think of anyway to make this data driven? I mean instead of hardcoding France, Germany, and other pieces, can we use some other logic to make this automatically work with changing data? – Baykal Dec 04 '19 at 20:17
  • Sure, We can do that using dynamic parameter. – Shriram R S Dec 05 '19 at 08:35