KNOWLEDGE BASE

Error "Case Expressions May Only Be Nested to Level 10"


Published: 23 May 2016
Last Modified Date: 29 Sep 2017

Issue

When working with a view in Tableau Desktop, the following error occurs: 

An error occurred while communicating with data source incorrect syntax near the keyword '[keyword]'
Case expressions may only be nested to level 10. 

Environment

  • Tableau Desktop
  • MS SQL Server

Resolution

Simplify any nested calculated fields. 

Cause

Queries for nested calculations are sent back to Microsoft SQL Server as nested case statements. Case expressions in SQL Server may only be nested to 10 levels. 
 
Did this article resolve the issue?