I'm using SAS Viya suite. I have my data about different units in the organisation as integers (category) 1-9. However, I'd like to present these with the unit's name in the report I'm creating. How can i get the actual names in the report instead of the integers/codes (1-9)?
I have access to SAS Studio and Prepare data.
Hi @DanielYar,
This sounds like a job for SAS Formats. Fortunately, there is a video for that.
Hope this helps.
Best wishes,
Jeff
Thank you @JBailey for the reply. it is indeed an advanced solution. For myself with (very) limited coding experience it is rather not an option for now. I thought maybe there could be ways of using report builder features to deal with it.
Thanks again, Daniel
Hi Jeff,
No, I don´t use the Enterprise Guide. I am quite new to SAS and start directly with the last version of Viya last autumn. I just had a Web-based training that give me the basic knowledge about the suite. However, not coding or advanced function yet.
However, I found a work around to the problem by creating new items in the data set with new labels. This add some new items to the table but solve the current problem.
Nevertheless. Id like to go ahead learning more about what you were suggesting and the coding.
Thanks for the engagement Jeff.
Best, Daniel
Hi @DanielYar
I am happy that you are making progress. If you need anything else, holler!
Best wishes,
Jeff
The SAS Data Studio product does provide the 'join' transform as well as a 'calculated column' transform. For this scenario though, I am not sure that 'calculated column' transform would suffice as this transform supports calculation of column in form: <column> = <expression>;
Data Studio also provides the 'code' transform which could be used for this use case. Logic could be added such as if/else or select statement to create column.
Documentation for SAS Data Studio to create custom code: SAS Data Studio 2.2 - Create Custom Code
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.