SAS Information Map Studio: Get me a new Data Item, puhhleeze!
When creating a new data item in SAS Information Map Studio, you might want to combine two or more data fields to make one. For instance, you want to create the data item Full Name from First Name and Last Name data items. Using the SAS CAT (concatenate) functions in the Expression Editor makes this is an easy task.
There are three CAT functions available from the SAS Information Map Studio – Expression Editor. Each of these functions has a slight difference that is useful in various situations.
For this example, you will learn how to use the CATX functions to create the Full name data item in three different ways:
- Employee Name is the First Name and Last Name
- Employee is the Last Name, First Name
- Employee Code uses the Employee Number and Last Name
Using Functions with the SAS Information Map Studio
The CATX function does 3 things:
- Concatenates two or more data items
- Removes the white space at end of the character value
- Allows you to set a delimiter (comma, space, and so on) between the data items
It’s one of the many SAS functions you can use when creating a new data item. You can learn more about the SAS functions here.
Create Data Item from Two Data Items
For this data item, you want a space between the first name and last name. When adding the code place a space between the quote marks. The following example show how to create the new data item.
Adding Space to Your Data Item
For this data item, you want a comma between the last and first names. Place a comma in the quotes. Also add a space after the comma otherwise the name will be like this:
Here’s an example of how to code this item:
Use Two Functions at Once
In the next screenshot, I have added another SAS function called UPCASE. Sometimes there is a requirement for the last name to be in all capital letters. By adding the UPCASE function around the LastName data item, it will convert that data item to upper case letters.
You can also see that the function was selected from the Function list.
Create Employee Code
For this data item, you are creating a code that has the employee number and the Last Name separated by an underscore. Place the underscore symbol between the quote marks to have it inserted between the data items.
Learn all about SAS BI
You can learn more about SAS Business Intelligence from the "SAS BI Bible." Take a peek inside the Building Business Intelligience with SAS book.
Latest posts by Tricia Aanderud (see all)
- Use Network Analysis to Understand Your Customers with SAS Visual Analytics 8.2 - 2018-01-21
- My 7 Favorite Features in SAS Visual Analytics 8.2 on Viya - 2018-01-14
- Creating a Web Analytics Report in SAS Visual Analytics 8.1 - 2017-06-19
- Designing Dashboards: Sending Your Style Vibe - 2017-01-21
- SAS Visual Analytics: Design Versus Reality - 2016-10-05
Tags: SAS Information Maps