Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a pivot table and I am trying to get the sum of rows , I have 2 dimensions. I wanna show partial sum for both dimensions but show the sum of rows instead of expression total.
Below is my expression
If((sum({<Year={$(=MAx(Year))},NO_BOP_FLAG={'0'},ORGANIZATION_NAME= ,[Line of Business]=>}INDEMNITY_PAID_YTD-INDEMNITY_RECOVERY_YTD)
or
sum({<Year={$(=MAx(Year)-1)},NO_BOP_FLAG={'0'},ORGANIZATION_NAME= ,[Line of Business]=>}INDEMNITY_PAID_YTD-INDEMNITY_RECOVERY_YTD))='0',0,
((max({<Year={$(=Max(Year))},Month = {"<=$(=Max(Month))"} ,NO_BOP_FLAG={'0'},ORGANIZATION_NAME= ,[Line of Business]=>}MthNbr)/12)
*Sum({<Year={$(=Max(Year))},NO_BOP_FLAG={'0'},ORGANIZATION_NAME= ,[Line of Business]=,Month = {"<=$(=Max(Month))"}>} ind_budget)))
In general, use advanced aggregation for sum-of-rows in a pivot table:
Sum(
Aggr(
If((sum({<Year={$(=MAx(Year))},NO_BOP_FLAG={'0'},ORGANIZATION_NAME= ,[Line of Business]=>}INDEMNITY_PAID_YTD-INDEMNITY_RECOVERY_YTD)
or
sum({<Year={$(=MAx(Year)-1)},NO_BOP_FLAG={'0'},ORGANIZATION_NAME= ,[Line of Business]=>}INDEMNITY_PAID_YTD-INDEMNITY_RECOVERY_YTD))='0',0,
((max({<Year={$(=Max(Year))},Month = {"<=$(=Max(Month))"} ,NO_BOP_FLAG={'0'},ORGANIZATION_NAME= ,[Line of Business]=>}MthNbr)/12)
*Sum({<Year={$(=Max(Year))},NO_BOP_FLAG={'0'},ORGANIZATION_NAME= ,[Line of Business]=,Month = {"<=$(=Max(Month))"}>} ind_budget)))
, YourTableDimensionField1, YourTableDimensionField2
))