Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to get a relative % in a pivot table, but the following formula doesn't work:
-Sum({$<YEAR={$(=vYear)}, MONTH={$(=vMonth)}>} If(ACCTNUM=SUBACCT,ACTIVITY * PERCENTAGE/100))
/
-Sum(TOTAL {$<YEAR={$(=vYear)}, MONTH={$(=vMonth)}>} If(ACCTNUM=SUBACCT,ACTIVITY * PERCENTAGE/100))
It gives me the same results this formula, which ignores the set analysis:
-Sum(TOTAL If(ACCTNUM=SUBACCT,ACTIVITY * PERCENTAGE/100))
Not sure what's happening but I've added set modifiers and the total divisor is being calculated properly now:
-Sum({$<YEAR={$(=vYear)}, MONTH={$(=vMonth)}>} If(ACCTNUM=SUBACCT,ACTIVITY * PERCENTAGE/100))
/
-Sum(TOTAL <ACCTNUM, SUBACCT> {$<YEAR={$(=vYear)}, MONTH={$(=vMonth)}>} If(ACCTNUM=SUBACCT,ACTIVITY * PERCENTAGE/100))
Not sure what's happening but I've added set modifiers and the total divisor is being calculated properly now:
-Sum({$<YEAR={$(=vYear)}, MONTH={$(=vMonth)}>} If(ACCTNUM=SUBACCT,ACTIVITY * PERCENTAGE/100))
/
-Sum(TOTAL <ACCTNUM, SUBACCT> {$<YEAR={$(=vYear)}, MONTH={$(=vMonth)}>} If(ACCTNUM=SUBACCT,ACTIVITY * PERCENTAGE/100))