Hello everyone
My worry is about having a deep understanding of FORMAT
So i m trying to calculate the average within each range that is created within the format
Following is the code
proc format;
value SalesRange 0 - <100000 = 'Lower'
100000 - <200000 = 'Middle'
200000 - high = 'Upper';
run;
data shoerange;
set sashelp.shoes;
salesreport = put(sales,SalesRange.);
run;
title" sales report";
proc print data = shoerange;
var sales salesreport;
run;
How do i proceed to calculate the average of first range second range and third range
Thanks for your help
Looks like something that has been answered last week.
Your proc format has syntax errors ... then replace everything after proc format with
proc means data=sashelp.shoes mean nonobs;
class Sales;
var Sales;
format Sales SalesRange.;
run;
Your exact question, with the exact same wording, has already been asked and answered. https://communities.sas.com/t5/SAS-Programming/How-to-calculate-average-within-format-ranges/m-p/781...
In my opinion, a very poorly designed problem.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.