Sas functions query


ques : In the original dataset I want to know the number of people whose average installment is greater than hundred.
1)The problem I am facing is that I used the arithmetic variable to divide the Total_Amount by Total_Installments to get the Total Avg(calculated in sas). But in the result the answer is not coming right .To verify this i have done calculations in excel as well ,you can have a look in the result data set at Total_avgexcel (this has been calculated in excel).
2) Secondly to count the number of person i have used the count variable. What are the various method to display only those variables which we want to…one such method i learned was pro sql,is there any other method for it.

original dataset


resulted dataset after running data new_2 has been shown below


hi @sanchi_singh1,

1.You said you need to do Total_Amount by Total_Installments but in SAS you are doing Total_amount/Total_transactions.
2.For the second ques,do u want to display only the people who have Avg_Amount > 100 or the count of the number of people having Avg_Amount > 100??
For showing only specific variables you can use the keep = option while creating the new dataset.


Thank u sir…i only want to display the count…It was a great help thanks alot…:slight_smile: