BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Is it possible to use CASE and WHEN expressions in Information Maps Studio? If not what would be alternative solutions to generate computed fields within information maps?
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
Although Stored Process and Information Maps are both components of the SAS Enterprise Intelligence Platform, this forum is for stored process questions. Your best resource for help with Information Map questions is Tech Support. The method that you use (manually typing the CASE statement in the Expression Builder window or using the INSERT DATAITEM syntax) will vary depending on how you intend to create the Information Map. In addition, since your Information Map can reference Relational Tables or OLAP cubes, you would use MDX expressions for OLAP cubes. So the type of data will have an effect on what you want to do.

I have successfully typed a case statement in the Expression Builder Window of Information Map Studio. We teach the simple form of building expressions in chapter 3 of the Information Map Studio course. When you want to add an additional DATAITEM to an Information Map, you use an Expression Builder in Information Map Studio or the INSERT DATAITEM statement in PROC INFOMAP.

To send a question to Tech Support, go to http://support.sas.com/ and in the left-hand navigation pane, click on the link entitled "Submit a Problem".

cynthia
jasonDMNK
Calcite | Level 5
Hi Kelly,

It is possible. Here's a quick example if you wanted to recode missing values to 0 on a budget data item:

Create a new data item --> Click Edit on the Definition Tab
In the Expression Editor window enter this into the Expression Text:
case
when <<Table.Budget>> =. then 0
else <<Table.Budget>>
end

Obviously you can make it more complex, just make sure to validate the expression.
Hope that helps!

Jason

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 797 views
  • 0 likes
  • 3 in conversation