A custom format for the percent of change will help do the grouping BUT first you need to indicate which end of the ranges the exact values belong in.
For example you show a value of 20%, which would be .2. With displayed bound of 0.15 - 0.2 and >0.2 which one does it display?
so is the range actually:
0.15 (inclusive) up to but not including 0.2
not including 0.15 up to and including 0.2
And is the pattern consisitent as is is the lower bound or upper bound inclusive for each value?
I am guessing that you could want something like
proc format;
value myperc
low -< -0.2 = '<-0.2'
-0.2 -< -0.15 = '-0.2 < -0.15'
-0.15 -< -0.1 = '-0.15 < -0.1'
-0.1 -< -0.05 = '-0.1 < -0.05'
-0.05 -< 0 = '-0.05 < 0'
0 -< 0.05 = ' 0 < 0.05'
0.05 -< 0.1 = '0.05 < 0.1'
0.1 -< 0.15 = '0.1 < 0.15'
0.15 -< 0.2 = '0.15 < 0.2'
0.2 - high = '>0.2'
run;
proc tabulate data= have;
class percentchange /order=internal;
format percentchange myperc.;
var OldBill NewBill;
table percentchange, n='NumberBills' (OldBill='AvgOldBill' NewBill='AvgNewBill')*mean=''*f=Dollar9.2;
run;
... View more