cancel
Showing results for 
Search instead for 
Did you mean: 

Help I stuck on "This field cannot be summarized"

Former Member
0 Kudos

I'm trying to build a report that measures the rate a clinic exceeds standard visit resolution.

For each Clinic I need a count of patients with 1 or more visits exceeding standard or @Yes_No = "Yes"

Group 1 = Clinic Name

Group 2 = PatID

Detail fields = PatID, VisitID, Visit Start Date, Visit End Date

A patient can have several visits

Here are my formulas
 

Code:
@HourstoResolve := DateDiff ("h",{@StartDateTime},{@Sh_OrderDateTime} )



 

Code:
@Yes_No :=
If
    (ToText({@Sh_OrderDateTime}) = "" or
    ISNULL({@HourstoResolve}) or
    ISNULL({@StartDateTime}) or
    {@HourstoResolve} > 2)
then
    "Yes"
else
    "No"



 

Code:
@ExceedStandard :=
If
    {@Yes_No} = "Yes"
Then
    1
Else
    0


I placed a RunningTotal Formula in the detail section but I still can't get the total by CLinic


Can anyone help?

Thanks
Steve

Accepted Solutions (1)

Accepted Solutions (1)

former_member205840
Active Contributor
0 Kudos

Hi Steve,

Are you getting 1 / 0 in detail section based on your formula  ?  If so, try this formulas :

Whileprintingrecords;

Numbervar pcount:=0; // Place this formula in Clinic group header

Whileprintingrecords;

Numbervar pcount:=pcount+@ExceedStandard;  //Place this in detail section

Whileprintingrecords;

Numbervar pcount; // Place this formula in Clinic group footer

This will give you totals per clinic.

If you are not getting 1 / 0 in detail section then go in each formula, on top you will see 'Exceptions for Null' drop down click on drop down and select 'Default Values for Nulls.

Thanks,

Sastry

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Steve,

1) Change the @Yes_No code to:


If
    ({@Sh_OrderDateTime} = cdatetime(0,0,0,0,0,0) or
    {@HourstoResolve} = 0 or
    {@StartDateTime} = cdatetime(0,0,0,0,0,0) or
    {@HourstoResolve} > 2)
then
    1

2) Go to Insert Summary > Select this formula in the 'Field to Summarize' > Choose 'Sum' as the summary operation > Choose 'Group #1' as the Summary Location.

-Abhilash