function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
panayottipanayotti 

calculate total tickets of leads

The database:

 

id - user - tickets

1 - user1 - 10

2 - user2  - 20

 

 

I would like to add up the total tickets of all users in the database and be able to sort them by created record date (10 + 20 = 30). I'm not able to add 'standard summary fields' in order to sum the total amount of tickets.

Best Answer chosen by Admin (Salesforce Developers) 
JakesterJakester
If tickets is a numerical field on the Lead object, something is wrong - you should be able to Sum it. I'd recommend calling Salesforce tech support.

All Answers

JakesterJakester

I'd like to help, but I'm completely lost by your post.

 

Are we talking about Cases? Is that what you mean by tickets? By "database", do you mean a table of data that has 3 columns? What's strange about your "database" is that it has an id column, which usually would indicate a single record, and then a tickets column, which appears to be a summary of the number of tickets grouped by user. But if it's a summary, then you wouldn't have a unique id to represent it. So... maybe the "database" is supposed to represent the end goal you're trying to reach, rather than the data that you have? If so, I still don't understand the point of the id column.

 

Also, you say you want to add up the total tickets and group by user (I assume you mean the user that's the current record owner), but then you say you want to sort them by created date - but if you want to sort by a date then you'll need to show every record, not just the totals. Also, I don't know what 10+20=30 means - since in your example "database" there's two different users, I wouldn't think you'd want to add these together, unless you're talking about a grand total.

 

With a better description of the data you have and the goal you're trying to achieve, I'm sure someone here can help you out. 

panayottipanayotti

Hey Jakester, I apologize for not being clear enough, I typed the post in a hurry. Let me try again!

 

Yes, tickets is a column in the leads table. The id represents a single record.

 

The example table shows there are 2 users. One user has ordered 10 tickets, the other user has ordered 20 tickets. I need to calculate the grand total of this, and then show it in a rapport. Which would add up to 30 in this example.

 

We also have a field Create Date, which shows the creation date of the user record. Yesterday, there were 10 new users, with a grand total of 50 tickets (5 per user). Today, there are 5 new users with a grand total of 15 tickets. This needs to be shown in a graph; total ordered tickets per day. I managed to generate a graph based on the total new users per day (sum of the record count).What needs to be done now is generate a graph based on the total tickets per day. For this to be done, I'd need to calculate the grand total of ordered tickets per day. That's where the problem lays. I was thinking it needs a Summary Formula of some kind, but I'm not able to show the tickets column in the Standards Summary Fields list, if that is indeed what needs to be done.

 

 

I hope someone could help me out on this one and hope I was clear enough this time. Thank you.

JakesterJakester
By user, do you mean Lead? Is tickets a numerical field?
panayottipanayotti
Yes to both questions.
JakesterJakester

Create new report-->Leads-->Leads-->Next-->Summary

 

From here, do you not see a way to Sum the number of tickets?

panayottipanayotti

That's exactly the problem. It's not showing in the summary field list and so I'm not able to sum the total tickets.

 

I'm only seeing Record Count, Annual Revenue, No. of Employees, Converted, Unread by Owner and Optin.

 

How can I add the tickets field to this list?

Message Edited by panayotti on 06-15-2009 11:07 AM
JakesterJakester
If tickets is a numerical field on the Lead object, something is wrong - you should be able to Sum it. I'd recommend calling Salesforce tech support.
This was selected as the best answer
panayottipanayotti

Thank you for your help, much appreciated!