Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Divide one column by another in SAS Enterprise Guide 1

Status
Not open for further replies.

NHSSAS

Programmer
Mar 19, 2010
4
GB
Hi,

I want to divide the sum of column A by the sum of column B. Is this possible using the various standard tasks within SAS or does it require coding? Any ideas how to do this?

Thanks
 
I intitially wrote that you'd need to do it in 2 steps however you can do it in 1.
create a new query on the start dataset, select the columns you want summed and in the summary column change "None" to "SUM".
Then click on the computed columns button > New > Build Expression...
When it asks about calculated columns, say yes.
double click on the first summed column, then input a '/' after it, then double click on the second summed column.
Job done.

Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top