cancel
Showing results for
Did you mean:
Regular Visitor

## Grand total not applying correctly to all rows in a matrix table

Hi everyone!

I work with a non profit for a project and I was given a task of creating a dashboard based on some data they supplied. Below is a screenshot to help explain my issue. I have a calculations (''theorectical fairshare') that is a calculations of the grand total of this date range (1,160,901) x ('Fairshare %). As you can see, the grand total created works for the branches (durham, greenville, New bern, ect) but I should have the same grand total for the counties (chatam, orange, ect) that are drilled down from this matrix table to be used in the very same calculations. The grand total dyanmically changes depending on the date filter as well. This is how I calculated the grand total :

Grand Total Meals = CALCULATE([Total Meals Test], ALL('Food Insecurity'[Branch]))
Total Meals Test =
SUM('Fairshare Access TBL'[KC_Total_Meals]) + SUM('Fairshare Access TBL'[SP_Total_meals]) + SUM('Fairshare Access TBL'[WPP_Total_Meals])

To reiterate, the whole grand total meals should be the same number regardless if I drill down to lower level of rows. Am i writing my dax expression wrong?

Solution Sage

Hi @jcgunawan, Take the branch out of the all clause and see if that works. This will return the total the entire table regardless of drill down.

All(Food Insecurity)