6 Replies Latest reply: Apr 2, 2018 7:41 PM by Pete Bolin

# Table totals

I'm looking for the total value for those in the brackets only (s/b 53). Total should replace the 893. I can't figure out how to do it. Thanks for any help

Thought this would do it, but it didn't.

• ###### Re: Table totals

One solution would be to use Set Analysis in your expression of Summing or counting your cancels to only show a cancel code of one character.

Sum({\$<'Cancel code'={"?"}>}[# of cancels])

• ###### Re: Table totals

Thanks for the help.

• ###### Re: Table totals

May be this -

Sum({\$<[Cancel code]={"=len(trim([Cancel Code))>0"}>}[# of cancels])

or may be

Sum(if(len(trim([Cancel Code))>0,[# of cancels]))

• ###### Re: Table totals

Thanks for the help

• ###### Re: Table totals

May be [# of Cancels] is your field name. You can check in your fields list and correct if you know how to do it.

• ###### Re: Table totals

This gets me close. Thanks for your help help! I don't want to take up too much of your time. Thanks again!

proc freq data=out.success_rate_aphs;

where '27JAN18'D<=aph_date1<'26FEB18'D

and RB_YES_NO=1;

table CANCEL_CODE /nocol norow nocum nopercent;

run;