add up instances for a graph (1 Viewer)

oumahexi

Free Range Witch
Local time
Today, 12:36
Joined
Aug 10, 2006
Messages
1,998
Heeellp!

I've been shuffling this around for a couple of weeks now (on and off) and just can't quite manage to get the syntax right.

What I want to do is something like:

Count {COURSE_ANALYSIS_DET.CRITERIA}
Where {COURSE_ANALYSIS_DET.CRITERIA_ID}=21

Basically, I want to break the results (criteria) for each id down so that I can use the values for each of the three ids in my graph, so each will have it's own formula.

Any ideas how I can achieve this?
 

kevlray

Registered User.
Local time
Today, 05:36
Joined
Apr 5, 2010
Messages
1,046
Not sure where you are going with this. If you want a running total that evaulates only when {COURSE_ANALYSIS_DET.CRITERIA_ID} = 21, then that is easy enough to set up. If you group by {COURSE_ANALYSIS_DET.CRITERIA_ID} and have a count (either using the summary icon or a running total) and have it reset on the group then you get a result for each {COURSE_ANALYSIS_DET.CRITERIA_ID}. Then again maybe your are trying to achieve something I did not think about.
 

oumahexi

Free Range Witch
Local time
Today, 12:36
Joined
Aug 10, 2006
Messages
1,998
Not sure where you are going with this. If you want a running total that evaulates only when {COURSE_ANALYSIS_DET.CRITERIA_ID} = 21, then that is easy enough to set up. If you group by {COURSE_ANALYSIS_DET.CRITERIA_ID} and have a count (either using the summary icon or a running total) and have it reset on the group then you get a result for each {COURSE_ANALYSIS_DET.CRITERIA_ID}. Then again maybe your are trying to achieve something I did not think about.

Thanks Kev, here is exactly what I am trying to do:

In the main database, the user enters course Analysis details, on the screen the input is:

Criteria Label Criteria Value
OCR User inputs a value 1-4 where 4 is the best
CA As above
CCP As above

Criteria Label is taken from the table training_units_criteria and criteria value is stored in the table course_analysis_det

The results are then stored in the table {course_analysis_det} as follows:

Criteria ID Criteria
21 (for OCR) Number the user has input
22 (for CA) As above
23 (for CCP) As above

So the values are all stores in one field (criteria). In SQL you get a list like this:

Criteria ID Criteria
21 4
22 3
23 2
21 4
22 3
23 2
21 4
22 3
23 2

I need to break these down so that I can count the score for all Cirteria Labels where the Criteria Label = the Criteria ID. Presuming we have three records for the one course and the criteria values for OCR are all 4, the criteria values for CA are all and the criteria values for CCP are all 2 my graph should display the following information:

OCR criteria_value should = 12
CA criteria_value should = 9
CCP criteria_value should = 6

Hope this helps you to help me. Thank you so much for your help.

Ouma

Additional: I think I really just need a formula to do something like "Count Criteria while criteria_ID = 21" (22, and 23) so that I can then use formula fields to put the results into the graph.
 

kevlray

Registered User.
Local time
Today, 05:36
Joined
Apr 5, 2010
Messages
1,046
You should be able to create running totals (unfortunately one for each criteria, i.e., OCR, CA, and CCP). It would just be a sum of the value (not sure of the field name), evaluated only when the Criteria ID matches the particular code you want to count. You could do the same with formulas and shared variables, but running totals are easier to set up.
 

Users who are viewing this thread

Top Bottom