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

Comparing scores and summarising into a table.

Status
Not open for further replies.

n2nuk

IS-IT--Management
Dec 24, 2002
190
GB
Hi there,

I was hoping to re-use a solution provided by Lbass on thread thread767-1794186

This report is to assess the outcome of assessments undertaken with clients.
When we start work with a client a start assessment is completed that generates a score. during our work with the client further assessments will be undertaken. these are either review assessments or an exit assessment when we are coming to the end of the work.

What i need to do is find out across the service how many clients came out with a positive score, negative, no change or where the client is new and has an initial assessment only. for this exercise i am only using start and exit scores so have filtered out any review assessments.

This gives me two rows per client:

client id________assessment_date_________assessment_type__________score
14556___________18/02/2017______________start_assessment_________43
14556___________23/04/2017______________exit_assessment__________15
35421___________11/11/2017______________start_assessment_________34
35421___________18/01/2018______________exit_assessment__________43
59032___________16/08/2018______________start_assessment_________38
59032___________26/10/2018______________exit_assessment__________38
82122___________15/02/2019______________start_assessment_________21

I have grouped by client_id and in the group footer i have formulas that tell me if the score is positive, negative, no change or only initial assesment

What I'd like to do is summarise all the positives, negatives etc,

I have the following formulas,

Score_summary
if (isnull({#count_assessments}) or {#count_assessments} =1) then
"Initial Assessment" else

if previous ({@score}) > {@score} then "Positive" else
if previous ({@score}) < {@score} then "Negative" else
if previous ({@score}) = {@score} then "No Change"

This formula is in the group footer


positive formula
if InStr(( {@compare} ), 'Positive' ) > 0 then 1
the formula's for the other types is the same
This formula is in the group footer.

but when i come to sum the counts of positives, negatives etc in the report footer i am presented with an error "This field cannot be summarised
 
That is probably because you are using PREVIOUS in the formula. Now you should create a manual running total. So I think you could have one formula to do the totals. Something like this in the group footer.

Shared numbervar Positive;
Shared numbervar Negative;
Shared numbervar NoChange;

if {@compare} = 'Positive' then Positive := Positive + 1;
else if {@compare} = 'Negative' then Negative := Negative + 1;
else NoChange := NoChange +1;

Then have three formulas to just display the totals. i.e. the positive formula would like this: Shared Positive;

I am assuming that you would want the display formulas in the report footer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top