IssueWhen 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.
ResolutionOption 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 Use the Advanced Partitioning/Addressing of a table calculation to control how the SUM() is computed, instead of using an LOD.
CauseLOD expressions are row level expressions. Like all other row level expressions, they must be aggregated when used in table calculations.
Additional InformationMore information about Ranking issues can be found in the Community Forum: Rank using Level of Detail calculation in v 9.0Ranking Issue Tableau's Order of Operations
Did this article resolve the issue? Thank you for providing your feedback on the effectiveness of the article. Click here to return to our Support page. Open new Case Open a new case Continue Searching Click here to go to our Support page. Knowledge Base Get detailed answers and how-to step-by-step instructions for your issues and technical questions. Community Find and share solutions with our active community through forums, user groups and ideas. Product Help Browse a complete list of product manuals and guides. Available online, offline and PDF formats. Training and Tutorials Learn how to master Tableau’s products with our on-demand, live or class room training.