Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i am calculating my percentage like this in pivot table in one column say "Percentage".
=sum(if(AUTOFILL_FLAG=1,RX_COUNT))/sum(RX_COUNT)
it gives proper percentage.
But in next column i need to display Average percentage i.e. average of Percentage.
i need result like this
Percentage Avg Percentage
14% 13%
12% 13%
13% 13%
I am just putting Avg function to my above formula like this
AVG (sum(if(AUTOFILL_FLAG=1,RX_COUNT))/sum(RX_COUNT))
its displaying blank values noting comes out. Tell me if i am wrong anywhere?
thanks
Lavi
Finally it worked like this
Avg(Aggr(NODISTINCT sum(if(AUTOFILL_FLAG=1,RX_COUNT))/sum(RX_COUNT),RX_REGION_DS))
thanks
Lavi
hi
tyr like this once..
AVG (Aggr(sum(if(AUTOFILL_FLAG=1,RX_COUNT))/sum(RX_COUNT)))
regards
A'run'
Arun,
thanks for suggestion but it didn't worked. Any other code??
thanks
Lavi
any other response from anyone?
Arun,
well it worked if i used like this
Avg(Aggr(sum(if(AUTOFILL_FLAG=1,RX_COUNT))/sum(RX_COUNT),RX_REGION_DS))
i just needed to put dimension value in Aggr function separated by coma.
But it displays result like this
Percentage Avg Percentage
14% 13%
12%
13%
I want AVG percentage should be repeated as i mentioned in my earlier post
thanks
Lavi
Finally it worked like this
Avg(Aggr(NODISTINCT sum(if(AUTOFILL_FLAG=1,RX_COUNT))/sum(RX_COUNT),RX_REGION_DS))
thanks
Lavi