I can't figure out why the 3rd "if" statement will not work..It works in a separate formula but not when combined in this one. I need it in one formula so I can group by it. Any ideas???
if sum({@Inter Ref Count},{Patient_Assignment.patient_assignment_id})=0 and
isnull({Patient.referral_source}) then "BLANK"
else
if sum({@Inter Ref Count},{Patient_Assignment.patient_assignment_id})=0 and
Not isnull({Patient.referral_source}) then {Patient.referral_source}
else
if sum({@Inter Ref Count},{Patient_Assignment.patient_assignment_id})<> 0
then "INT REF
if sum({@Inter Ref Count},{Patient_Assignment.patient_assignment_id})=0 and
isnull({Patient.referral_source}) then "BLANK"
else
if sum({@Inter Ref Count},{Patient_Assignment.patient_assignment_id})=0 and
Not isnull({Patient.referral_source}) then {Patient.referral_source}
else
if sum({@Inter Ref Count},{Patient_Assignment.patient_assignment_id})<> 0
then "INT REF