Hi,
I am trying to come up with a margin figure based on the following calculation:
=AVG(IF(DWH_OP_DATE_YEAR=ThisYear AND DWH_OP_DATE_PERIOD=ThisPeriod,(SALES_VALUE_NET - COST_VALUE_NET)
/SALES_VALUE_GROSS))
But I want sum of sales value net - sum of cost value net / sum of sales value gross.
How can i achieve this?!
I've tried putting sum in front of each value but it always comes back with null.
Any help greatly appreciated!