2 Replies Latest reply on Jun 3, 2016 8:34 AM by Pete Mackay

    Filtering across data sources

    Pete Mackay

      To preface this question I'm not a data analyst, I've just been nominated as the guy at the office who gets to learn Tableau (my background is in design).  Unfortunately I can't post my example data so I'll try to explain this the best I can.

       

      I'm trying to create a line chart that displays the average of a single field each day from multiple data sources.  Because each of these data sources have garbage data in them I need to clean them up based on two different filters.

       

      1. Only include records in the average where the value is between 1-100

      2. Only perform averages for dates that have at least 1000 records

       

       

      I can easily get this to work for a single data source by creating a set of filters on the filter shelf, but when I add a second data source it isn't filtered.  Adding second set of filters from the matching data source truncates the timeline by changing the starting position to the first date in the second data source (which is much shorter than the first).

       

      To get around this I've tried creating a calculated field with an IF >=1 AND <= 100 statement for each data source after the first.  This actually works although I feel like this falls into the 'filthy hack' territory.  I've yet to come up with a 'ugly but workable' solution for the second filter in conjunction with the first.

       

      I've looked into using parameters to create global filters (I've only been able to do single selections like 'State', rather than number ranges), as well as dashboard actions (seems geared for applying filters from one sheet to another, not to multiple sources in the same sheet).

       

      So after 3 days of bashing my head against this I'm ready to ask for a little guidance.  Whats the best way to accomplish this?