Hi there,
I am new to proc report procedures, and I would like to ask a question regarding calculated value, and using calculated value to generate another calculated value.
For example, using the sample data below: (Fruit is spanned header)
Fruit
account apple pear peach
sales 100 200 400
cost 40 110 180
I'd like to create a report using SAS proc report. Specifically, I'd like to calculate the profit, and profit % for pear only. The output should look like the following:
Fruit
account apple pear peach
sales 100 200 400
cost 40 110 180
profit 60 90 220
profit% of pear 45%
Both profit and profit% of pear are calculated values. Could you please teach me how to do it using proc report?
Thank you.