With a non-aliased variable, you must also specify the statistic, like this:
avg_dep_amt = amount_deposited.sum / deposit_count;
With a non-aliased variable, you must also specify the statistic, like this:
avg_dep_amt = amount_deposited.sum / deposit_count;
In that case can I define like:
define amount_deposited / analysis sum n noprint;
in order to find:
avg_dep_amt = amount_deposited.sum / amount_deposited.n ;
instead making a new variable?
As always, Maxim 1: Read the Documentation.
It contains this example for having multiple statistics for one variable without the use of aliases.
But N is a special case, as it does not depend on a variable, but counts the observations instead.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.