KNOWLEDGE BASE

Unable to Convert Measure to Dimension


Published: 01 May 2013
Last Modified Date: 03 Jul 2017

Issue

When you create a calculated field, Tableau Desktop might recognize the field as a measure rather than a dimension. When you try to convert the field to a dimension, it might not be possible.

Environment

Tableau Desktop

Resolution

Use one of the following workarounds:
  • Remove aggregations from the calculated field. For more information about aggregations, see How to Create an Aggregate Calculation in Tableau Help.
  • If you created this calculated field to bin data, follow the steps in Binned Data in Tableau Help instead of using a calculated field.
    • Alternatively, a FIXED Level Of Detail expression can be used in the conditional statements of the calculated field instead of an aggregation. For example: 
      IF SUM([SALES]) < 100
      THEN "Low"
      ELSE "High"
      END	
      The above calculation can be converted to a dimension by using a FIXED LOD expression by modifying the syntax as described below:
      IF { FIXED [Region] : SUM( [Sales] ) } < 100
      THEN "Low"
      ELSE "High"
      END	
  • Perform the field calculation in the data source before you connect to the data source from Tableau Desktop.

Cause

If an aggregation is used in the calculated field, the measure cannot be converted to a dimension, because the results of the calculation are dynamic.
 
For example, the following calculation cannot be converted to a dimension:
 
SUM([Sales]) / SUM([Number of Records])

The following calculation can be converted to a dimension: 
 
[Sales] / [Number of Records]
Did this article resolve the issue?