BookmarkSubscribeRSS Feed
Calcite | Level 5


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?





Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 0 replies
  • 1 in conversation