joy_1379
joy_1379

Reputation: 499

Tableau: Multiple columns in a filter

I have three numeric fields named A,B,C and wants them in a single filter in tableau and based on the one selected in that filter a line chart will be shown. For e.g. in filter Stages B column is selected and line chart of B is shown. Had it been column A selected then line chart of A would be displayed .

Pardon my way of asking question by showing a image. I just picked up learning tableau and not getting this trick any where.

enter image description here

Here is the snapshot of data

enter image description here

Upvotes: 1

Views: 2371

Answers (2)

AnilGoyal
AnilGoyal

Reputation: 26218

Another way without creating a calculated field. Just pivot the three columns to rows and your field on which you can apply filter is created. Let me show you

This is screenshot of input data

enter image description here

I converted three cols to pivots to get data reshaped like this

pivoted_data

After renaming pivoted-fields column to Stages I can add directly this one to view and get my desired result.

enter image description here

Upvotes: 1

Caleb
Caleb

Reputation: 359

Create a (list) parameter named 'ABC'. With the values

A
B
C

Then create a calculated field

IF ABC = 'A' THEN [column_a]
 ELSEIF ABC = 'B' THEN [column_b]
 ELSEIF ABC = 'C' THEN [column_c]
END

Something like that should work for you. Check out Tableau training here. It's free, but you have to sign up for an account.

Upvotes: 2

Related Questions