0

first time posting!

I have a related question to an existing post. (How can a user use logic (AND/OR) to filter a dashboard in tableau?)

I would like to count the number of IDs (which are duplicated due to transforming data from wide to tall) who meet 2+ criteria selected in a single filter in Tableau.

Let's use the referenced post's data as an example:

ID Product
123 Chips
234 Soda
345 Soda
345 Chips
456 Beer
456 Soda
456 Chips

Suppose I want a distinct count of IDs where the Product filter (multi-select) has Beer AND Soda selected. My intended result count should be 1, since only ID 456 meet both criteria.

Out of the box, Tableau will count Beer OR Soda, giving me a result of 3, since IDs 234, 345, and 456 meet the Beer OR the Soda criteria.

Any thoughts on how to accomplish this? I might be overthinking it and maybe there's a simple solution

In the real data, there are about 50-60 different "products" which change from time to time, so making this user selectable through a filter is ideal.

1 Answers1

0

Indeed it's tricky but here is a solution: https://kb.tableau.com/articles/HowTo/How-To-Filter-Data-In-AND-Logic-When-Selecting-Multiple-Dimension-Members

Hope you don't have too many combinations :)

edit: This would also work, with your IF condition explicitly including 'beer' AND 'soda': https://kb.tableau.com/articles/howto/Counting-dimension-members-that-meet-a-condition2

Kellerness
  • 63
  • 5