Skip to Content
0
Nov 18, 2013 at 08:04 AM

calculating Average and Maximum in WEBI report?

2023 Views

Hi,

I have a requirement in my WEBI report to calculate Average and maximum.

According to the below table i need to calculate the Average and Maximum.

For a particular Dist Channel for a particular Org for that caleder year for that cal month2 i need to calculate Average.

if by using Dist Channel:

Count = Count(Qty) in Dist Channel = 3 ( without considering Org, Cal year & Cal Month2)

Sum = Sum(Qty) in Dist Channel = 10+20+30 = 60

Average = Count/Sum = 60/3 = 20 ( which is a wrong value in my case)

Correct calculations are like below i need:

Count = Count(Qty) in Dist channel in Org in Cal year in Cal month2 = 2

Sum = Sum (Qty) in Dist Channel in Org in Cal Year in Cal month2 = 10+20 = 30

Average = Count/Sum = 30/2 = 15

Please help me how can i achieve this?

Dist Channel Org Cal Year Cal month2 Qty Average Maximum DS1 Org1 2012 JAN 10 (10+20)/2 = 15 20 DS1 Org1 2012 JAN 20 (10+20)/2= 15 20 DS1 Org2 2012 FEB 30 30/1 = 30 30 DS2 Org1 2013 JAN 40 40/1 = 40 40 DS3 Org2 2013 JAN 50 50/1 = 50 50 DS3 Org3 2013 MAR 60 60/1 = 60 60 DS4 Org3 2013 MAR 70 70/1 = 70 70