Solved

Display Customers that have double the average number of calls

Posted on 2011-02-17
13
359 Views
Last Modified: 2012-05-11
Hi

I need to build a report that shows the customers that have double the average number of HD calls.
First I have figured out what the average is, my formula looks like this -

Average = distinctcount ({opencall.callref}) / distinctcount ({userdb.keysearch})


My formula that calculates what the double average looks like this -

{@Average} * 2

I then need to display the customers who have Double or more than this figure,however I 'm not sure how to do this, can someone help?

Thanks
0
Comment
Question by:Dan560
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 4
  • +1
13 Comments
 
LVL 9

Expert Comment

by:snurker
ID: 34916817
If the results are in the details section, suppress users that @customeraverage<(@totalaverage*2)
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34916970
Are you grouping on customer?

You could use a Group Selection formula like

distinctcount ({opencall.callref},{CustomerField}) / distinctcount ({userdb.keysearch},{CustomerField}) > distinctcount ({opencall.callref}) / distinctcount ({userdb.keysearch})

mlmcc
0
 
LVL 2

Author Comment

by:Dan560
ID: 34917427
Hi,

I'm grouping on userdb.keysearch which is actually the table where my customer ID's are stored.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 200 total points
ID: 34919494
distinctcount ({opencall.callref},{userdb.keysearch }) / count ({userdb.keysearch},{userdb.keysearch }) > distinctcount ({opencall.callref}) / distinctcount ({userdb.keysearch})


mlmcc
0
 
LVL 35

Accepted Solution

by:
James0628 earned 300 total points
ID: 34924587
A couple of tweaks to mlmcc's group selection formula:

 Count ({userdb.keysearch},{userdb.keysearch}) will give you the number of records for each customer.  I don't think you want to divide the number of calls for each customer ( DistinctCount ({opencall.callref}, {userdb.keysearch}) ) by that.  Actually, I don't think you want to divide that number by anything.

 And if you want to see the customers with double the average or more, you need to multiply the overall average by 2.

DistinctCount ({opencall.callref}, {userdb.keysearch}) >=
 DistinctCount ({opencall.callref}) / DistinctCount ({userdb.keysearch}) * 2


 James
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34926809
Good catch.  I knew there was something wrong with the formula but none of my thoughts made sense.

mlmcc
0
 
LVL 2

Author Comment

by:Dan560
ID: 34927669
Thanks guys,

but "Count ({userdb.keysearch},{userdb.keysearch})" wont give me the number of records for each customer. It gives me the number 21. Where I would expect it to give me the total of customers that exsist within my system. Which is actually 245
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34928030
If you want all of them then just

   Count({userdb.keysearch})

By adding the second part you are limiting it to the group.

mlmcc
0
 
LVL 35

Expert Comment

by:James0628
ID: 34932364
Like I said, Count ({userdb.keysearch},{userdb.keysearch}) will give you the number of records for each customer, but I don't think you even need that part of the formula.  My version of mlmcc's formula doesn't include that.

 James
0
 
LVL 2

Author Comment

by:Dan560
ID: 34932556
Thanks when I put that in the group formula I get the following message -

" A constant expression is required here"

It then highlights
DistinctCount ({opencall.callref}, {userdb.keysearch})
0
 
LVL 35

Expert Comment

by:James0628
ID: 34949890
You accepted a solution after you posted that last message.  Do you still have a problem or did you get it figured out?

 James
0
 
LVL 2

Author Comment

by:Dan560
ID: 34950420
Yes thanks it's working fine. I didnt get the chance to update EE.

0
 
LVL 35

Expert Comment

by:James0628
ID: 34958956
OK, good.  I just wanted to check.

 James
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question