In this post, we will see how to resolve Use macro variable in macro function to filter data Question: I want to use a macro variable in a macro function to filter dataset based on date with a proc sql ...

In this post, we will see how to resolve Extract the start date depending on data entry Question: the following data ordered by id and date is given: I would like to set the start date according to the first ...

In this post, we will see how to resolve How to select duplicates rows with duplicates in each column in SAS Enterprise Guide? Question: I have time in SAS Enterprise Guide like below: COL1 COL2 COL3 10 12 44 15 ...

In this post, we will see how to resolve Equivalent of retain statement of SAS in R Question: I’m trying to translate a SAS code containing “retain” statement in R {dplyr} Is there a way to keep values and change ...

In this post, we will see how to resolve How to select only these rows where values in all column all the same in SAS Enterprise Guide? Question: I have time in SAS Enterprise Guide like below: And I need ...

In this post, we will see how to resolve SAS: Pass a variable’s value into a Macro Function Question: I’m relatively new to macro functions. I’m trying to build a function that, when supplied with numeric parameter “N”, will return ...

In this post, we will see how to resolve Find the most common value across multiple variables in SAS Question: I would like to: Count the number of times each value appears across multiple variables (year1 to Year5) find the ...

In this post, we will see how to resolve In SAS, one variable cannot use the other when creating a dataset Question: I am creating a dataset where one variable is generated from a distribution using the other variable as ...

In this post, we will see how to resolve calculating time periods between specific data entries Question: The following data is given and sorted by id and date. I would like to find out how many days lie between data ...

In this post, we will see how to resolve How to group records so the groups contains only specific variables? (proc sql) Question: I have a database of people with information that in which households they are included. How can ...