KNOWLEDGE BASE

Isolating Dimension Members to Use in Calculations and Filters


Published: 22 Feb 2013
Last Modified Date: 27 Jul 2018

Question

How to isolate a single member of a dimension to use in calculations and filters

Environment

Tableau Desktop

Answer

Select Analysis > Create Calculated Field.
  1. In the Calculated Field dialog box that opens, type a name for the field.
  2. In the Formula box, type the following formula: 

    IF [fieldName] = "Member_Name" THEN [measureName] ELSE NULL END

  3. Click OK.
In the attached sample workbook, the field is called Red, the dimension is Color, and the formula is:

IF [Color] = 'Red' THEN 'Red' ELSE NULL END

.

Additional Information

You can use the same steps to create a conditional calculated field to use as a filter.
Did this article resolve the issue?