MDX Query Exceeds MSAS Nesting Level Limits When Publishing a Workbook to Tableau Server

Published: 14 Mar 2016
Last Modified Date: 15 Feb 2018


After publishing a workbook to Tableau Server, the workbook will fail to load in both the preview window and directly on the server. Tracing the internal error back through the logs will show an error message like the following passed from MSAS:
Query (42, 7) Execution of the managed stored procedure DATEADD failed with the following error: Microsoft::AnalysisServices::AdomdServer::AdomdException. 
Deeply nested recursive calculations cannot invoke a CLR Stored Procedure. 

Note: the specific stored procedure and line/character numbers may vary.


  • Tableau Server 9.2.4
  • Windows 7
  • MSAS


Option 1

Downgrade to Tableau Server 9.0, which does not experience this issue.

Option 2

Redesign the workbook so that the error does not occur.  The Nesting Level Limit may be related to the calculated fields or filter definitions.


In some circumstances, Tableau Server 9.2.4 can generate queries which exceed the 32-level limit for nested procedure calls, which is not expected behavior.

Read about nesting of stored procedures and managed code references up to 32 levels.
Did this article resolve the issue?