• Status: Solved
• Priority: Medium
• Security: Public
• Views: 203

# Need help getting a count

I have a report were I have the top 3 categories of our Helpdesk system.  I need to get a count for how many times each of these categories were used.  Anybody have an Idea on how to do this?
0
Icontech
• 6
• 5
• 2
1 Solution

Commented:
I assume you have a group in the report for the category.

Then use the count function
Count({SomeField},{CategoryField})

mlmcc
0

Commented:
a running total.
give the running total a name
field to summarize: pick a field that is most distinct
type of summary: count

evaluate:
use a formula: {category field} in ['your','fields','here']

reset
never - grand total
or
On change of group
0

Author Commented:
Its grouped by Queue and then I used Nth most freq to find each category.  I have an N = 1, an N = 2, and an N = 3.  I need a count for each on of these when the queue changes. How do I get it do count just the category that is displayed without hard coding the specific category.
0

Commented:
Right click a field in the detail section
Click INSERT  --> SUMMARY
Choose COUNT as the summary function
Put it in the group footer

mlmcc
0

Author Commented:
This will give me the count for all categories in that group not just the top category in that group.
0

Author Commented:
I need the count for the number one must used category that was used by each queue.
0

Commented:
yeah.. mlmcc.. he only wants the count of the top 3.  and the top 3 change so he does not want to go into the formula and change it.

Well in theory.. you would want to read each one of your top 3 into a variable. Then cycle through and count where variable equals the column. But i am not sure how this is done.
0

Commented:
What groups fo you have on the report?

Where do you want the count shown?

mlmcc
0

Commented:
So do you have it like this

Group 1 - QUEUE
Group 2 - CATEGORY

Try this idea

WhilePrintingrecords;
Global numberVar QueueCount;
QueueCount := 0;
''

In the CATEGORY group footer
WhilePrintingrecords;
Global numberVar QueueCount;
QueueCount := QueueCount + Count({SomeField},{CategoryField})
''

In the QUEUE group footer
WhilePrintingrecords;
Global numberVar QueueCount;
QueueCount

mlmcc
0

Author Commented:
I only have it groped by queue.  When I added the group by category it then shows all categories not just the top 3 most used.  This will not work because of that.  I only need the count for the top 3 categories used by the each queue.
0

Author Commented:
Once I figured out the evaluation port it worked.  Thanks for your help. The part it took me a little bit on was [your fields here].  My field was the Nth formula that I used to figure out the top 3 categories.  Thanks for your help.
0

Commented:
In that case you will have to use formulas to count the records or a running total as wykabryan suggested.

mlmcc
0

Author Commented:
I did a running count with the evaluation of
{workitem_current_view.workitem_category_tree_value} = NthMostFrequent (1, {workitem_current_view.workitem_category_tree_value}, {workitem_current_view.owned_by_worker_name}).  I had to setup three of them.  What he said was exactly right I just had to figure out what the formula was.  And then also reset on group.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.