1 of 1 people found this helpful
The most straightforward solution would be to add a new Calculated field that concatenates these two fields into a single field, and use that as your filter.
I don't have v9 of Tableau installed to be able to upload a workbook you can open, but it could be as simple as:
// Vendor Filter
[Vendor Name] + " : " + STR([Vendor Number])
You need the STR() argument to turn the integer into a string (text) so you can combine the two fields.
When you drag that into the filter shelf, your users can now search by either name or number to find the vendor they'd like to filter by.
Tableau will just do "AND" logic on quick filters.
You can make your own "OR" calc that would looks something like this:
IF <whatever constitutes condition 1> OR <whatever constitutes condition 2> THEN 1 ELSE 0 END
Then you put that calc on the filter shelf and select for value = 1.
But the real question is how you collect your user's input to condition-1 and/or condition-2.
You could have two parameters. One is a list of vendor names. The other a list of vendor numbers. Let you user select from those, and then for condition-1, for example, you would do:
... [Vendor Name] = [Vendor Name Parameter] ...
Still, I see problems here. What do you do if the user has one selection for Vendor Name, and another for Vendor Number? You could end up gathering two vendors on your sheet. You could prevent that by popping out an error sheet that covers your data viz if there are conflicting selections. "You cannot have a selected value in both "Vendor Name" and "Vendor Number"." (Something like that.) Provide a "none" option in each parameter. One or the other needs to be set to "none".
All this is just thinking out loud. Maybe it will trigger the idea you need to handle this requirement.
I like that, James. Wildcard match on the filter.
This post: CoEnterprise | Blog - Playing with Parameters Part I: Extending Search Logic also describes how to extend search logic and give users opportunity to search and filter data on a variety of dimensions.
Thank you so much James!
Your solution worked for me. This was the first topic I posted on Tableau and thank you for the quick turnaround. I was told that Tableau community is awesome and I completely agree with that.
Thank you all!
Please mark the answer as correct to close the thread