KNOWLEDGE BASE

Error "Invalid expression, cannot be unaggregated" When Viewing Underlying Data


Published: 25 Apr 2014
Last Modified Date: 02 Jun 2016

Issue

When you try to view underlying data, the following error might occur:
 
Invalid expression, cannot be unaggregated.

Environment

Tableau Desktop

Resolution

Use one of the following workarounds:

Option 1

Hide the calculated field that includes a set. For more information, see Hide or Unhide Fields.

Option 2

In the calculated field that includes a set, use an IF THEN ELSE END statement instead of COUNT(). For example use:
IF [<SetName>] = true THEN 1
ELSE 0
END
Instead of:
COUNT([<SetName>])

Option 3

Use sets as filters rather than calculated fields. For example, instead of using the following calculated field:
IF [<SetName>] THEN [Sales] END
Replace the calculated field with Sales and drag <Set Name> to the Filters shelf.

Cause

This message might appear when a set is used in a calculated field. Because the data for sets cannot be disaggregated, Tableau Desktop is unable to calculate the underlying data of the worksheet. 
Did this article resolve the issue?