FIX: Totals are wrong after you filter on a pivot table item and remove the filter in SSAS

Applies to: Microsoft SQL Server 2012 Analysis ServicesMicrosoft SQL Server 2016 Service Pack 1SQL Server 2017 Developer on Windows

This hotfix also applies to Microsoft SQL Server 2014 and 2017 Analysis Services (SSAS), SQL Server 2012 SP2, and SQL Server 2016 SP1.


Consider the following scenario:
  • You create a pivot table by using one measure and several dimension attributes in SQL Server Analysis Services (SSAS).
  • You filter on a specific item, and then you remove the filter from one of the dimensions.
  • In the filter condition, there is a previous query (query 1) that has a sub select, and a subsequent query (query 2) that runs on a perspective.

    • Both query 1 and query 2 run under the same role.
    • The space that is sought by query 2 can be satisfied from the space of query 1 (without the sub select slice). There is a calculation on query 1 and also on query 2, and this causes the results to be cached and then searched in the global formula engine cache.
In this scenario, the totals are wrong because they still display the sum of the specific filtered item.


The problem occurs because of a regression in "Grand Totals" from Cumulative Update 4 for Microsoft SQL Server 2012 SP1.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.