Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal sum of grouped fields

Status
Not open for further replies.

shirleyt

MIS
Aug 13, 2009
7
GB
I have various summaries within a group which I'd like to sum. There are 4 separate field summaries to add, but if I set up a formula it only gives me a grand total, as the fields being counted don't have the relevant date to match the group date. Anyone have any suggestions please?

Heres how it looks - the group is @month

Count(field1) Count(field1 with scoring formula)
Count(field2) Count(field2 with scoring formula)
Count(field3) Count(field3 with scoring formula)

Thanks in anticipation

 
What is the group structure of the report? Please identify the fields you are grouping on. We know you have a month group (Group #1?), but what is your other group? It sounds like you have summaries at an inner group level that you want to summarize at the outer group level.

In case this is the issue, you can add group conditions to summary formulas as in:

count({table.field1},{table.group#2field})

-LB
 
Hi lb - the report links an Access customer survey db to the main service desk db by a reference number. The Access db has scores against question fields eg Access.Q1, Access.Q2 etc. The resolution date from the service desk db is used to group the responses by month. There is no other grouping on the report. I'm trying to get a complete score by month of questions answered, but can only get the overall complete score. Hope this helps clarify. Thanks
 
Something like complete score by month of questions answered could be done by a crosstab.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
So does your data look something like this?

Date Q1 Q2 Q3
12/21/2009 3 5 0
12/22/2009 0 1 2
12/23/2009 0 0 4

If so, what would the desired result be for the above sample data?

-LB
 
If you are able to successfully create the month group, then all you need to do is create a formula like this:

{table.Q1} + {table.Q2} + {table.Q3}

Place this in the detail section and insert a sum on it at the month group level. This assumes that Q1, Q2, etc., are not actually summaries, but fields in the Access database.

-LB
 
Hi LB

That was my first try, but all it gives me is the total across the whole data, ie if Dec is 15, Nov is 14, Oct is 16, using the formula you mention puts 45 in each of the month sections.

Thanks
 
Did you insert a group on month? How does the data display in relation to these groups? Does all the data (for all months) show up in each month?

-LB
 
Hi LB

There is a group on month, and it displays the data relevant to each month. It's only when I summarise across the fields that it gives an overall total.

Thanks
 
Did you right click->insert a summary at the group level? Or did you create a formula to do the summary? If you create a formula, you have to add a group condition:

sum({@threefields},{table.date},"Monthly")

-LB
 
Hi LB

I tried to insert a summary at group level, but the formula for the fields isn't shown in the list. Thanks, Shirley
 
You should be placing the formula in the detail section->right click on it->insert->summary->sum->group level.

-LB
 
Hi LB

Not sure if its the version I'm using, but having put formula field in detail, then selected insert, summary, the field does not appear in the list for selection.
 
Your formula should look like this:

{table.Q1} + {table.Q2} + {table.Q3}

Please paste your exact formula into the thread.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top