I need Partial Sum of dimensions to be appeared in each columns in Pivot Table. I have used sum(Total Price) in expression but each column only picks sum of all dimensions not partial sum of it.
A total sum for a section of data can be calculated either by using Aggr(Sum()) or by using Sum(). For either option to work a predetermined set of dimensions are required. With collapsed and expanded dimensions in a pivot table the dimensionality is not static within a pivot table. For this reason it is not possible to calculate the partial total without making the expression a nested expression.
Please try the below expression as an example of how the calculated the partial sum as a column;
if( Dimensionality()=1, sum(Price),
if( Dimensionality()=2, sum(TOTAL <Region> Price),
if( Dimensionality()=3, sum(TOTAL <Region, Month> Price),
if( Dimensionality()=4, sum(TOTAL <Region, Month, Category> Price),
By adding Dimensionality() as a separate expression you can see how this value varies depending on if dimensions are collapsed or expanded.