hello,
I have a report where I am listing all principal diagnosis. I have a formula which counts if the clients have a specific diagnosis.
formula:
if ({history_diagnosis.axis_I_diag_code_1} startswith ["291","292","303","304","305"]
or {history_diagnosis.axis_I_diag_code_2} startswith ["291","292","303","304","305"]
or {history_diagnosis.axis_I_diag_code_3} startswith ["291","292","303","304","305"]
or{history_diagnosis.axis_I_diag_code_4} startswith ["291","292","303","304","305"]
or {history_diagnosis.axis_I_diag_code_5} startswith ["291","292","303","304","305"]
or {history_diagnosis.axis_I_diag_code_6} startswith ["291","292","303","304","305"]
or {history_diagnosis.axis_I_diag_code_7} startswith ["291","292","303","304","305"]
or{history_diagnosis.axis_I_diag_code_8} startswith ["291","292","303","304","305"])
then 1 else 0
now i get a 1.00 if the client has one of the above diagnosis. I can do a sum on this formula however if a client was open to multiple programs and has one of the above diagnosis for those programs the client is displayed twice and counted twice. if the client is listed more than once i just want to count the client once.
I tried a running total and that did not work
I tried doing a distinct count on client_id however this only gives me a distinct number of clients regardless if they meet the above diagnosis.
help