Davidson
Davidson

Reputation: 1108

Tableau: How to display two distinct columns in worksheet, but in the filter concatenate the two columns

For example, I show two columns--CustNumber and CustName. In a filter, I would like to concatenate the two values something like this:

10100  My Customer

This would allow the user to enter either the customer number OR some of the customer's name in drop-down filter to filter by.

Thank you.

Upvotes: 0

Views: 319

Answers (2)

Alex Blakemore
Alex Blakemore

Reputation: 11919

You can create a calculated field as G Hart states.

You can also create a combined field, by selecting multiple dimensions in the data pane and right clicking to Create->Combined Field. The combined field behaves very similar to a calculated field in most respects and you can easily change the delimiter or field order.

There are a few restrictions with combined fields. They can’t be used in most (or all?) calculations, nor to populate the list of possible values for a parameter. But they are easy and convenient otherwise.

Upvotes: 1

G Hart
G Hart

Reputation: 546

You would need to create a separate calculated field to use as the filter.

CustNumberName =

STR([CustNumber]) + ' ' + [CustName]

CustNumberName can then be used as a filter (presumably set to Wildcard Match) and the existing 2 columns can stay in the pane.

Upvotes: 1

Related Questions