Hi.....Is it possible from having to list the variable names in the Column Statement as the number of columns may change depending on the time frame for my dataset. For example, I am creating a report on the Annual Sales and each column represent the Sales for each year. Column names could be 2014, 2015, and 2016 if the dataset has the sales for these 3 years, However, the dataset could contain Sales for more than these 3 years and it is not known until the dataset is summarized. Any suggestions on how to get around this....Thanks.
Yes, if you use a naming convention. Then you can use a variable list or the colon notation. For example if you used Year as the prefix in front of your Year variables.
Column Year: ;
Another option would be to use a long dataset and treat the variable as an ACROSS variable.
Yes, if you use a naming convention. Then you can use a variable list or the colon notation. For example if you used Year as the prefix in front of your Year variables.
Column Year: ;
Another option would be to use a long dataset and treat the variable as an ACROSS variable.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.