Baykal
Baykal

Reputation: 569

Filtering Based on a Different Column on Tableau

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?

Upvotes: 3

Views: 12080

Answers (1)

Shriram R S
Shriram R S

Reputation: 136

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

Upvotes: 6

Related Questions