问题
I have a dataset that looks similar to this:
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.
回答1:
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)
来源:https://stackoverflow.com/questions/25321106/tableau-filtering-on-duplicates