Try using a table calculation; for example:
Non Producing (%) =
IF FIRST()==0 THEN
WINDOW_SUM(SUM([Non Producing]), 0, IIF(FIRST()==0, LAST(), 0)) /
WINDOW_SUM(SUM([Total Dlrs]), 0, IIF(FIRST()==0, LAST(), 0))
This will calculate the value for each row, including the grand total. The FIRST()==0 means it will only do the calc once for each partition and the IIF(FIRST()==0, LAST(), 0)) is an optimization makes the window 1 value long for all but the first value (which is all we care about, given the FIRST()==0 clause).
See attached. ...
percentages_grandtotal.zip 13.2 KB
Thanks Jim! This is extremely helpful. And thanks Bharat for posting the same question I've been wrestling with.