Hi i want to count total number of cases in data set .
The data has variable status so want to count total no of cases based on the values of status.
filter should be where status=cr then the total count should be stored in new variable.
if status-ct then count of ct in new variable.
In SQL, this would be
select count(*) from ...... where status = "ct";
In SQL, this would be
select count(*) from ...... where status = "ct";
In the query builder, select status and apply the count() summary function to it; on the second tab, add the where condition.
That's three questions in one.
@anirudhs wrote:
Hi i want to count total number of cases in data set .
Use a summarization task
@anirudhs wrote:
The data has variable status so want to count total no of cases based on the values of status.
Again, a Summary task will produce that.
@anirudhs wrote:
if status-ct then count of ct in new variable.
In a separate data set, how do you need that stored? You can use Query builder with a filter or you could save the results from the summary tasks into a dataset for use later.
It seems like all your results could be handled with a summarization procedure.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.