Loading

Tableau Cloud: "Field [TEMP(...)] is missing in the subquery result for relation" (Error 0x89D9C6F2) When Exporting or Viewing a Dashboard

Publiseringsdato: Oct 30, 2026
Beskrivelse
Applies to
  • Tableau Cloud 
  • Tableau server
  • Workbooks and published data sources with multiple connections (federated or cross-database data sources)

Issue
A view fails to load, or a dashboard fails to export to PDF or crosstab, on Tableau Cloud. The error can be intermittent. It may not occur on Tableau Server or in Tableau Desktop. It can also appear after an embedded data source is changed to a published data source.

Error message
Request Rejected by Server TableauException: VisitRelation: Field "[TEMP(<name>)(<number>)(0)]" is missing in the subquery result for relation "[$subquery].[<number>]" Error code: 0x89D9C6F2


Cause
A calculated field combines aggregates from two or more database connections. Tableau creates a temporary TEMP field for the calculation, and that field is missing from the subquery result. Two patterns appear in the error:
  • TEMP(<calculation name>): an aggregate calculation that uses fields from different connections.
  • TEMP(TC_): a table-calculation-style function (ATTR(), RUNNING_SUM(), INDEX()) used in a calculation that references fields from different connections.


How to identify the issue from the error
  1. Check whether the data source has more than one connection. If it has only one, this article does not apply.
  2. Read the TEMP field name in the error.
  3. If it reads TEMP(<name>), find the calculated field with that name and go to Fix A.
  4. If it reads TEMP(TC_), search all calculated fields that reference fields from different connections for ATTR(, RUNNING_SUM( and INDEX(. Then go to Fix B or Fix C.
  5. To find the field name, open the .twb or .tds in a text editor and search for it. A packaged workbook (.twbx) makes this easier.
Løsning
Workaround

Fix A: aggregate calculation across connections (TEMP(<name>))

WINDOW_SUM(expr, 0, 0) returns the current mark's value, the same as SUM per row. It runs as a post-query table calculation, so no cross-database TEMP field is created.
// Original (SUM([A]) + SUM([B])) / (SUM([C]) / 90) // Fixed (WINDOW_SUM(SUM([A]), 0, 0) + WINDOW_SUM(SUM([B]), 0, 0)) / (WINDOW_SUM(SUM([C]), 0, 0) / 90)


Fix B: ATTR() in a CASE or IF on cross-database fields (TEMP(TC_))
// Original CASE ATTR([Dimension]) WHEN "X" THEN SUM([FieldFromDB1]) / SUM([FieldFromDB2]) END // Fixed CASE MIN([Dimension]) WHEN "X" THEN WINDOW_SUM(SUM([FieldFromDB1]), 0, 0) / WINDOW_SUM(SUM([FieldFromDB2]), 0, 0) END
Two changes:
  1. Replace ATTR( with MIN(, which turns it from a table calculation into an aggregate.
  2. Wrap the cross-database SUMs in WINDOW_SUM(..., 0, 0) to avoid cross-database TEMP fields.


Fix C: RUNNING_SUM() or other table calculations on cross-database fields (TEMP(TC_))
// Original RUNNING_SUM(SUM([Field])) // Fixed IF NOT ISNULL(SUM([Field])) THEN WINDOW_SUM(SUM([Field]), 0, 0) END
This loses the running or cumulative behavior. If you need the running sum, use the field only in views that do not also use the second connection. A field that uses INDEX() and has no database field reference cannot be replaced directly. Hide it if it is not used in the view.

Where the formula is defined    Where to edit
Published data source (.tds)    Edit in Tableau Desktop, then republish
Embedded in the workbook (.twb)    Edit the calculated field in the workbook
Both    Fix both. The workbook definition takes precedence for that sheet.
 
To check which level a formula is defined at, right-click the field in Tableau Desktop and choose Edit. If it opens the data source calculation editor, it is data source level. If it opens a local calculation, it is workbook level.
 
Before you publish
  • Test in a test project and compare results with the original numbers.
  • Check every sheet that uses the fixed field. WINDOW_SUM(..., 0, 0) keeps per-mark values, but table calculation addressing should be verified.
  • Repeat the steps if the error still appears, because another calculation may cause it.
Knowledge-artikkelnummer

005465443

 
Laster
Salesforce Help | Article