KNOWLEDGE BASE

Unable to Use a Table Calculation such as RANK() on An LOD (Level of Detail) Calculation


Published: 08 Feb 2016
Last Modified Date: 29 Dec 2016

Issue

When using RANK() on an LOD calculation, the following error might occur: 
All fields must be aggregate or constant when using table calculation functions or fields from multiple data sources.

Environment

Tableau Desktop up to 9.2

Resolution

Option 1

Apply aggregation to the LoD such as RANK(SUM([LoD])). Note, this will aggregate the LoD up to the level of detail of the view.

Option 2

Do not use an LoD and instaed use the Advanced Partitioning/Addressing of a table calculation to control how the SUM() is computed.

Cause

At this time, LoD expressions cannot be used inside table calculations.
Did this article resolve the issue?