I actually asked a very similar question a little while ago and got a very good answer:
It was about using user filters, but it applies to filtering in general. The three options listed are
- Duplicate your data source and blend in the unfiltered aggregated data (this is actually a lot easier than it sounds)
- Use pass through functions to a DB (if you're in oracle you can use an analytical function to pre-aggregate the data) To use your example it would look something like this SUM(Total_points) over ( ) as total_points_scored (caution about pre-aggregating data before bringing it into Tableau. Tableau is designed to take the fine grain detail and perform the aggregation. If the data set is misused and the aggregate field ends up being 1,000,000 points someone might erroneously sum those data points together and conclude there were 32,000,000 points scored in the NFL last year)
- Use table calculations (still works because of the order in which tableau carries out its operations: Business AnalyticsThe order in which Tableau carries out operations and calculations
I hope this is helpful. I know Robin Kennedy really helped me out.
I propose you this very simple solution to your scenario.
Create a calculated field based on Points Scored measure counting just the Points Scored by the subset of NFL Team using the formula:
IIF([NFLTeams]=='Giants' Or [NFLTeams]=='Patriots' Or [NFLTeams]=='Eagles', [Points Scored], 0)
Then create a bar chart by dragging Measures Names to Columns shelf and Measures Values to Rows shelf
Filter Measure Names to keep the two measures of your interest [Points Scored] and the new calculated field Points Scored by Giant Patriots Eagle
I created a sample data set and a workbook to demonstrate this solution.
I hope this helps
Ramon - unfortunately your calculation will not work because my "total points" measure is aggregated in the data source. So I get an error with your formula that I can't mix aggregate and non-aggregate. Any work arounds?
Cory - I am having trouble following your response. I will try to wrap my head around it and see if it works.
Please, upload your packaged workbook with sample data to provide a solution for you.