<< Back

Tableau: From Good to Great; Maintain Table Calcs while Filtering

In this new series of blog posts I’ll be reviewing and sharing some of the best tips you should be learning if you’re looking to take your knowledge of Tableau to the next level.

First on my list of tips I want to share was this one for filtering table calculations in Tableau and still maintaining their values. For example when you calculate a Percent of Total and wish to filter out one of the dimensions you will find normal filtering leaves all your values at 100%.

The trick is to use a Table Calculation to do the filtering, create a new field; Lookup(ATTR([Field]),0). This acts after the data has been queried (because it’s a table calculation) and therefore does not filter the underlying data, thus maintaining any calculations which use the rows you are filtering.

I’ve put together this short 10 minute video so that you can see this useful tip in action:

 

 

Filtering and Hiding using Table Calculations

 

 

Chris Love

Nottingham, UK

7 thoughts on “Tableau: From Good to Great; Maintain Table Calcs while Filtering

  1. Great post. Your posts an the work of everyone are helping me develop my skills on Tableau. As I work independently, I gain a lot from picking up tips like these! I have already used this to analyse the relative expenditure across service areas within the Local Authorities in Wales.

  2. Great tip! A quick follow-up question if you don’t mind: after creating the new table calculation, is it possible to sort the values of the filter? It seems to default to an alphabetical sort (Central, East, South, West), but I’d like to be able to sort it manually to a different order. My problem uses days of the week, so a more logical order would be M, T, W, Th, etc. I don’t see an option to change the default sort when I right-click on the measure or once I use it as a filter. Any insight would be great, thanks in advance!

  3. Great post! I am wondering if anyone has found the breakthrough to be able to have the same affect but with a dashboard action rather than a filter?

  4. Hi Great article, however I have another worksheet underneath and I want to filter that by the same TC calc, so what ever you choose in the TC calc the bottom sheet filters. When you click on the options on the TC filter you get different properties and you dont get “Apply to Worksheets”, you just get single value, multiple value, etc,etc

    Any help or an additional addon to the above would be super
    John

Leave a Reply

Your email address will not be published. Required fields are marked *