12 Replies Latest reply: Dec 1, 2016 5:41 AM by Moses Zwane

# Calculate Averages in set analysis

Good morning,

I am trying to calculate averages for the attached file. The formula I have used to calculate

Total_PreviewTime=Sum ({<PreviewedFirst={1}>}PreviewTime) and I want to calculate the Average Total_PreviewTime  and similarly for

Total_CallTime=sum(CallTime) I want to calculate Average Total_CallTime

PFA,

Thanks

• ###### Re: Calculate Averages in set analysis

What about

Avg({<PreviewedFirst={1}>}PreviewTime)

and

Avg({<Total_CallTime={1}>}Total_CallTime)

• ###### Re: Calculate Averages in set analysis

Hi Manish,

I am actually looking for the Average of Sum ({<PreviewedFirst={1}>}PreviewTime), if there is something like

avg(Sum ({<PreviewedFirst={1}>}PreviewTime)). Not sure if this is possible

Thanks

• ###### Re: Calculate Averages in set analysis

You can try something like:

avg(Aggr(Sum ({<PreviewedFirst={1}>}PreviewTime), Dim1))

Where Dim1 is dimension(s) on which the aggregation is desired.

• ###### Re: Calculate Averages in set analysis

Thank you for the all the responses, when I use this  =Avg(aggr(Sum ({<PreviewedFirst={1}>}PreviewTime),Day)) and I use Interval format (hh:mm:ss) and my graph comes like

• ###### Re: Calculate Averages in set analysis

So this is not what you are looking to do? What is your expected output here?

• ###### Re: Calculate Averages in set analysis

Hi Sunny T,

The formula is fine but now when I put on the line graph, the I select the format of Interval hh:mm:ss is not translating correctly. I am expecting the time intervals of 00:00:00  to 00:30:00

thanks

• ###### Re: Calculate Averages in set analysis

Perhaps the output you are getting has to be parsed as seconds. Try like:

Time#(Avg(aggr(Sum ({<PreviewedFirst={1}>}PreviewTime),Day)), 'ss')

and then apply your time format in the presentation tab.

• ###### Re: Calculate Averages in set analysis

You probably need same average across days, if so try like:

=Avg(Total aggr(Sum ({<PreviewedFirst={1}>}PreviewTime),Day))

• ###### Re: Calculate Averages in set analysis

May be something like this:

Avg(Aggr(Sum({<PreviewedFirst={1}>}PreviewTime), CallCentre, Desk, Team_Lead, Agent_Name, Day))

• ###### Re: Calculate Averages in set analysis

You need to use Aggr as per Tresesco;s reply..

Avg(Aggr(SUM(YourExpression),Dim1,Dim2,Dim3))

• ###### Re: Calculate Averages in set analysis

Hi Moses,

you can try

Aggr(Sum ({<PreviewedFirst={1}>}PreviewTime),Dim1,Dim2,Dim3) / Count ({<PreviewedFirst={1}>}PreviewTime)

• ###### Re: Calculate Averages in set analysis

Thank you much for  your assistance and but Payal's is correct and the format is also correct.