How can I filter over a bar graph data while showing the average of the entire data set?

Viewed 97

I am making an interactive dashboard in Tableau that looks something like this: https://public.tableau.com/app/profile/monica.ionescu/viz/ExploringHIVStatisticsinSouthAmerica/Dashboard1?publish=yes

(for your best viewing experience, please view the dashboard in the fullscreen view - button on bottom right corner of the board)

I need some help with the bar chart.

I currently have a reference line in place to mark the two averages so that they don’t move as I filter through data. When using the average line feature, the filters on the left change all the graphs on the dashboard in real-time (and thus the average with it). So, it seems like the average line is built from the data points currently on display rather than all the data points in our data set.

I want to show the averages on the bar graph as they are in the image (a constant for the whole data set) without having to manually set the average each time I add/update the data.

How do I make it so that when I change the filters, the bar graph changes but the average stays constant?

Thank you so much!

1 Answers

You can self-blend the data sources - duplicate the data source, but DON'T join any fields/set up relationships. The lack of join can make the secondary source act as a constant.

Alternatively create a FIXED calculation to calculate the average. This should also act as a constant - just make sure none of your filters are in context.

Related