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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count Function 1

Status
Not open for further replies.

plextor

IS-IT--Management
Jan 7, 2003
34
US
I'm trying to do a count function on the frequecy of the # of times a year is shown within a table thats grouped by ther results of a specfic questions.

Here's what i currently have...

Grouped by {HelpDeskSurvey.Question1} with results that get displayed like this.

Always
Sometimes
Rarely
Never

When the users results are pegged to the {HelpDeskSurvey.Question1}table a year is also assigned to the {HelpDeskSurvey.SurveyYear} table (2001,2002,2003). What I'm trying to do is group the results by the specific year.

Results 2002 2003
Always 25 20
Sometimes 17 22
Rarely 68 41
Never 11 22


Thanks for your help.....

Brian
 
Create a crosstab based on the 2 field, then place this in the group footer....

Reebo
UK

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."
- Albert Einstein (1879-1955)
 
I was able to get it to work in the crosstab enviornment. However, I would like to avoid going that route. Is their any other way

Thanks again ,
Brian
 
Please explain why you don't want to insert a crosstab.

-LB
 
I wasn't able to control with the display of the coloms. For example I want to have the end results displayed like this.

Results 2002 2003 2002 2003 Diffrence
Always 25 20 15% 20% 5%
Sometimes 17 22 35% 25% -10%
Rarely 68 41 25% 30% 5%
Never 11 22 25% 25% 0%

It allows the years to be combined with this display. However, i wasn't able to show it like the example above.

Brian
 
You could do a manual crosstab. Group on the the questiona and then on the answer field, and then create formulas for each column like:

if year({table.date}) = 2002 then 1 else 0

if year({table.date}) = 2003 then 1 else 0

Then insert sums on these and suppress the details.

For the percentage fields, you would need to create formulas like:

sum({@2002},{table.answer}) % sum({@2002},{table.question})

-LB



 
That did the trick...... Thank you very much!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top