SSAS Tabular grand total wrong with hierarchy filter

vincent 0 Reputation points
2025-09-19T04:34:47.6266667+00:00

I am using SSAS Tabular 2022 and has model as below:image

The total amount is calculated as

Total Amount:= sum(Amount[Amount])

When I view in Excel and filter the model by the Year-Month-Date, the first time under any level of the filter is always correct. For example, I filter first on date 2024-05-04:

User's imageUser's image

But then when I filter other date in May or May itself (one level up), the grand total does not change and remains what I selected previously. For example, I filter on month 2024-05-01:

User's image

User's image

I tried refreshing data in data tab but the results are still the same. Why is that? And how should I fix it?

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
{count} votes

1 answer

Sort by: Most helpful
  1. Venkata Ramanamma Uppu (Quadrant Technologies LLC) 0 Reputation points Microsoft External Staff
    2025-10-30T06:56:44.0566667+00:00

    Hi vincent,

     Thank you for reaching out to Q&A Forum.

    The issue is not with your DAX formula but with Excel caching the old filter context when navigating SSAS hierarchies. When you move from a date-level (e.g., 2024/5/4) to a higher level (e.g., May 2024), Excel doesn’t always refresh the MDX context, so the total remains unchanged.

    To fix it, redefine your measure as:

    Total Amount =

    CALCULATE(SUM(Amount[Amount]), KEEPFILTERS(VALUES(Calendar[Date])))

    This ensures totals recalculate correctly based on the active date filter.

    Alternatively, refresh the PivotTable or convert it to formulas to force recalculation.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.