KNOWLEDGE BASE

Including Filters in Calculations Without Including them on the Filter Card


Published: 30 Nov 2015
Last Modified Date: 10 Oct 2017

Question

How to include filters in calculations without including them on the filter card. 

Environment

Tableau Desktop

Answer

Option 1

Create a logic calculation by using an IF / THEN statement to return a measure for only certain dimension values. See an example of a calculated field below: 
If [Color] = "Yellow"
Then [Size]

End

The example returns the field [Size] for rows of data with the color value of Yellow. [Size] could be replaced by a different field in the formula to return something different.
 

Option 2

You can filter the calculation without filtering the entire view, you may use this type of calculation using the "Include" LOD:

{INCLUDE [Added Dimension]: IF MIN([Added Dimension]) = 'FilterValue' THEN [Aggregated Measure] END

Did this article resolve the issue?