Here in this pivot table for the field volume i have written the expression
=if(Dimensionality()=0,
Sum(Aggr(sum(Query3.Volume),Query3.Water_System,Query2.REGION,MonthName)),
if(Dimensionality()=1,
Sum(Aggr(sum(Query3.Volume),Query3.Water_System,MonthName))
))