Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tableau Filtering on duplicates

Tags:

tableau-api

I have a dataset that looks similar to this:

enter image description here

As you can see some ABNs have multiple business names attached while others have just one. I want to create a filter that allows the user to see just those rows where there are multiple names to each ABN. For example, a filer that will filter out ABN 456.

I can imagine how I would write that in SQL, but cannot get my head around how to do it in Tableau. Any help would be appreciated.

like image 427
user2343837 Avatar asked Aug 15 '14 04:08

user2343837


People also ask

How do I filter out duplicates?

In Excel, there are several ways to filter for unique values—or remove duplicate values: To filter for unique values, click Data > Sort & Filter > Advanced. To remove duplicate values, click Data > Data Tools > Remove Duplicates.

How do you exclude duplicates in tableau?

All you have to do is add an aggregate and add all fields to the Grouped Fields section. Nothing will be aggregated. Only unique rows are retained while duplicates will vanish before your eyes. You can continue the Tableau Prep flow with a nicely deduped data set.


1 Answers

I believe the easiest way to do that is through a conditional filter.

1) Drag ABN to filter

2) Go to the Condition tab

3) Select By field, Number of records, Sum, >, 1

That way you're filtering ABNs that have more than 1 record. If you have more granular data (e.g. different classifications of the amount), and Number of Records is not exactly what you're looking for, you can use BUSINESS NAME, Count(Distinct). That is bullet proof for what you need (though a little slower)

like image 160
Inox Avatar answered Oct 17 '22 14:10

Inox