Comparing Filtered Data to Unfiltered Data


Comparing Filtered Data to Unfiltered Data

Occasionally, you will find the need to compare filtered data against the total data source. As Tableau’s filters remove the data from the data partition, this can sometimes be a tricky problem.

You might be tempted to try the “Total” function in a formula like the following:


As you will quickly discover, since the filters removed the filtered results from the data source, this does not return the graph you’d expect it to and you end up with an interesting, but useless, chart.

Tableau Total Sales

By duplicating your data source and joining on it, you can bypass this problem. In the join, instead of joining logically, you will need to join on something fairly arbitrary, such as “Ship Date” in the SuperStore data. If I had joined on “Region”, I would have the same problem, as the “Region” field in the new data set would also become filtered.

Tableau Join

After you have the join setup correctly, simply pull in the “Sales” field from the joined data source and edit aliases as needed. 

Tableau Total World Wide Sales

In my case, I changed the new field to “WW Sales”, but if you’d like to compare against only “United States” sales, you can do so by simply creating a secondary filter on the new data.

Tableau Total US Sales

Note: In this example, my results are fairly simple and can also be achieved using other methods. If possible, use the built in “analysis -> totals” functionality, parameters, or calculated fields instead of a self join. In many cases, however, these alternatives are not possible and this solution is needed.

KeepWatch by InterWorks

Whether you need support for one platform or many, our technical experts have you covered.

More About the Author

Derrick Austin

Curator Platform Lead
Five Years of Custom Embedded Analytics with Curator Thinking back, 2013 was an interesting year for many reasons. During the “International Year of Quinoa”, the world welcomed Prince ...
Curator by InterWorks Officially Turns 4 Curator is turning four years old! It’s awesome to be celebrating this milestone, but some of you may have just met Curator for the ...

See more from this author →

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK


Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Geschäftsführer: Mel Stephenson

Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072


Love our blog? You should see our emails. Sign up for our newsletter!