Loading

Calculated fields with Username() functions in LOD expressions saved to a Data Source do not show in workbook authoring

Veröffentlichungsdatum: Sep 15, 2026
Beschreibung

A calculated field defined in a published data source uses a user function (for example USERNAME()) nested inside a Level of Detail (LOD) expression. The field looks valid while editing the data source and validates in Tableau Desktop, but it does not surface in the data pane when a new workbook is created from the published data source or when using web authoring. 

Lösung

This is expected behavior, not a defect. It occurs specifically when the user function is nested inside the LOD; a plain user-function calculation, or an LOD without a user function, publishes and appears normally.

Workarounds:

1. Rework the calculation so the user-function logic sits outside the LOD. Compute a per-user flag first, then aggregate that flag.
   - Create a field such as: `IsUser = IF USERNAME() = [Owner] THEN 1 ELSE 0 END`
   - Then reference it inside the LOD: `{ FIXED [Region] : SUM([IsUser]) }`
2. Alternatively, keep the data source embedded in the workbook instead of publishing it standalone. Embedded data sources retain viewer context and work as expected.
3. Alternatively, build the calculated field inside the workbook rather than the published data source, or handle row-level security at the workbook level (or via an entitlements/mapping table).

**Why:** A user function resolves per viewing user and needs live session/user context. When a data source is embedded, that context is present. When it is published standalone, it is treated as shared and is often evaluated at extract-refresh time, where no individual user context exists — so a user function nested inside an LOD cannot resolve and the field becomes invalid. It can still look valid in Tableau Desktop, which is why it appears in the data source edit view but not in a new workbook. Recent versions (2025.1+) validate this more strictly than before, so calculations that previously slipped through are now blocked.

Nummer des Knowledge-Artikels

005460008

 
Laden
Salesforce Help | Article