Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
its_anandrjs

Minutes average calculation problem

Hi All,

I want to calculate minutes Avg duration of call Ids, but problem occurs that there are same minutes value values for the different call ids so how can i sum it like for call

ID01 - 26.03

ID02 - 21.37

ID03 - 26.03

......

And so far there are so many ids that has repeted values but when i apply Distinct then it count as single value but it is repeated so many times for the IDs.

For Feb i calculate there are right now three ids

and sum is

26.03 + 21.37 + 26.03 = 99.46

Sum of Mins = 99.46

Count of Calls = 3

99.46 / 3 = 33.15

Any suggestion will appreciated

Please help for that.

Regards,

Anand

19 Replies
SunilChauhan
Champion II
Champion II

try this

Avg(Distinct Minutes)

Sunil Chauhan
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Let me explain what i understood from your question.

   As per your requirement you want avg of minutes ( even tough they are repeated many times for same ID's)

   i.e in case if you have data like

   ID01 - 26.03

   ID02 - 21.37

   ID03 - 26.03

   ID01 - 21.37

   So in this case the avg you want will be (26.03+21.37+26.03+21.37)/4 = 23.7

   If yes then you can achieve this using this expression.

   Sum(Min) /Count(ID)

Regards,

Kaushik Solanki 

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
its_anandrjs
Author

Hi kaushik,

Yes i do this Sum(Min) /Count(ID) but wrong result see attachment please

Also when i has first 3 IDs Data

ID01 - 26.03

ID02 - 21.37

ID03 - 26.03

Result will be this:--

26.03 + 21.37 + 26.03 = 99.46

Sum of Mins = 99.46

Count of Calls = 3

99.46 / 3 = 33.15

But problem is that for ID01 26.03 repeated 20 times and and also if i sum by Sum(DIstinct Minutes) it counts only 26.03, 21.37 how i manage the ID03 - 26.03 also.

Please provide help.

Regards,

Anand

its_anandrjs
Author

Hi ,

I want to divide it by total CallIds.

Regards,

Anand

SunilChauhan
Champion II
Champion II

try this

sum(Distinct Minutes) /Count( all ID)

Sunil Chauhan
its_anandrjs
Author

Hi Kaushik,

Please provide help for that.Its urgent.

Regards,

Anand

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, 

    I dont have Qlikview on my Laptop Now. So i cant try anything.

    Still i am thinking on this.

    Will post as soon as i got something.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
its_anandrjs
Author

Hi,

When apply All it gives bad names error.

Regards,

Anand

its_anandrjs
Author

Hi,

Please it is urgent, when you got solution please provide help on thread as well as on Sample.

Regards,

Anand