changing calculation for Partial Sums using SecondaryDimentionality
I need to change the logic of partial sums calculation in pivot table. For year quartes, instead of sum of 3 month, I need the last month value to be presented as quarter total. I use SecondaryDimentionality but it won't work properly'
In given example, instead of 19730 (sum of months) I want to get 6317 (last month val)
To solve this I use secondary dimentionality to locate on which level of cumulation given section is.
After that I use Max(Month) to check if last month of the quarter is properly defined for quarter total column - and it works - for Q1 I get 06-2019, for Q2 I get 09-2019.
Sadly the result is correct only for highest quarter . In example below - correct for Q2 and total overall, incorrect for Q1. It's strange because Max(Month) correctly assigned 06-2019 as last month of Q1.