BookmarkSubscribeRSS Feed
HenriTheuwissen
Calcite | Level 5

Hi,

Assume the following table with 3 fields:

Contract  Start_Dte   End_Dte
CTR001    01JAN2013   31DEC2015

CTR002    01JUL2012   31DEC2014

CTR003    01JUL2012   31JAN2013

I want to build an InfoMap allowing the user to compare the number of active contracts on 2 different dates, for instance on 31DEC2012 there are 2 active contracts (CTR002 and CTR003) and on 31MAR2013 there are also 2 active contracts (CTR001 and CTR002).

To achieve this I want to build an InfoMap with a Data Item with a dynamic name, being the result of

       CASE WHEN "&date"d between Start_Dte and End_Dte then 1 else 0 as Dte_&date

where &date is the result of a prompt. So the name of the data item depends on the answer on a prompt.

In a query the user should be able to select this data item twice, generating 2  columns in the result, for instance: Dte_31DEC2012 and Dte_31MAR2013.

Is this possible?

Thanks,

Henri

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
  • 0 replies
  • 680 views
  • 0 likes
  • 1 in conversation