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_: );
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.