In your expression, you are explicitely returning 0 for your total line (dimensionality() = 0).
Instead, try using a sum-of-rows-in-pivot-table expression (check the HELP for more details, there is a whole chapter that covers that).
It would probably look similar to
sum( aggr( YOUREXPRESSIONCOLUMN1, Location, Month) )
where you need to replace YOUREXPRESSIONCOLUMN1 with the appropriate expression and double check your aggr() dimension field names.