KNOWLEDGE BASE

Creating a dual axis view while using the same measure with different filters for each mark/axis


Published: 04 Apr 2016
Last Modified Date: 15 Aug 2017

Question

How to combine two line graphs into one view, when each line graph uses the same measure with different filters that are based on sets?

Environment

  • Tableau Desktop

Answer

Hard-code filters into calculated fields to use as measures instead.

Example:

One view is created showing a filter that only includes Sales for the "West" region created via a set. (Called [West])
The other view is created showing a filter that only includes Sales for the "Central" region created via a set. (Called [Central])

The hard-coded filters for the calculated fields would look as follows:
 
IF [West] THEN [Sales] END

and

IF [Central] THEN [Sales] END

Additional Information

Calculated fields may need to be adjusted based on aggregations used for measures.
Did this article resolve the issue?