08-18-2014 06:52 AM
Any idea how I can convert my count and balance into a percentage?
create table work.kptoverall_&A1. as
select distinct month_date,
count(*) as count,
sum(balance_outstanding) as balance,
avg(balance_outstanding) as average_balance
where optimum_platform = 'Optimum'
and overall_multiplier >= 3
and Overall_lit_stage_code not in ('L4','L5','L6')
group by month_date;
08-18-2014 09:59 AM
Yes, i want the result in a percent rathr than a count or balance. RW9, i have tried to add the percent format as suggested but I get an error message - Tables with 0 columns are not supported by this object. Any ideas please?
08-18-2014 10:17 AM
Sounds like your not getting data from the query. Can I check what you mean however, can't really tell what you want from the text as its still vague between using a calculation to achieve a percent, or just adding % symbol? Maybe post some test data and required output.
08-18-2014 11:07 AM
Below is the current output, at the moment im getting the numeric field but I have added a column to the right to show the %. I need to repance the numeric number (second column)and replace with the percentage (third column).
B 16,018 24%
R 16,669 25%
I 17,094 26%
R 16,206 25%
total 65,987 100%
08-18-2014 08:55 AM
If all you need is a report showing the %, PROC TABULATE does that automatically without having to change the data. If you actually need a data set holding the %, the answer will be very different. If you are determined to create a data set, you will need to create grand totals to use as denominators in your % calculations.