Hi Cynthia,
Thank you! It works fine for me, one more question if you don't mind. I got my table from transposing another table. Hence the column name is not static, for example it can be profit_march, profit_april, profit_may instead of profit_january, profit_february, profit_may depending on the given parameter.
If that is the case how do I define the Column?
Thanks!
If you transposed from a data set that had month as a variable you might be better off to go back to that and use month with a label of "Profit" as a column header. Sort order would probably be best to have month as the number of month and use a custom format to display the month's name so order=internal.
Or if you had actual date values use an appropriate format for a date.
Then you don't have to worry about changing numbers of months and adjusting a list of variables.
COLUMN Company ('Profit' profit_: );
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.