BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi All,

I'm new to web report studio and information map studio and am HOPING someone can help me. I'm trying to create a report that shows the time period covered by the report. I have a date field and can do the max and min of the field, but I don't know how to tell it to show a distinct value. What I have now is a table that shows the max and min date on every row. I want to have a field at the top of the report with the distinct max and min date. Any thoughts?
2 REPLIES 2
RichardH_sas
SAS Employee
One low-tech solution would be to create two reports, one on top of the other. The first would have the lowest and highest date values and nothing else. The second would have the data you wanted to report on. I'm pretty sure with List Report there's a way to get just the distinct min and max... maybe not though.

The other alternative is to create a stored process to do this. A stored process is a SAS program with a few tweaks that gets registered in metadata and can be surfaced in many SAS platform applications (including Web Report Studio). You can create stored processes in Enterprise Guide, SAS interactive windowing environment (where you'd write and submit SAS code), or I suppose any text editor in the sense that SAS code is fundamentally just text. EG is probably the easiest way to develop a stored process because you get all the point-and-click tasks, plus there's a Wizard that handles the necessary "tweaks" to get from SAS program to stored process. Using Macro variables in the stored process code, it'd be easy to create a title with the Min and Max date values. That is, if you're comfortable writing SAS code. 🙂

Others may have some better ideas... but I can't think of a way to separately capture min and max in a "title" aside from what I described above.

Richard
mrvt
Calcite | Level 5
Hi,

You could try this solution.

In your IMAP, create 2 new data items based on your "date" field.
1st. Min. Date: type measure; agregation Minimum; format date
2nd. Max Date: type measure; agregation Maximum; format date

Then in WRS, when you create your report, you select the new items.
You insert a TEXT object in which you can insert dynamic values (measure or prompt values). There, you can write: From [Minimum date] to [Maximum Value].

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 688 views
  • 0 likes
  • 3 in conversation