BookmarkSubscribeRSS Feed

How to prompt for a date range in a SAS VA report – Example 1 Slider (Range)

Started ‎01-21-2020 by
Modified ‎06-04-2020 by
Views 7,447

This series of articles will look at ways to prompt for date boundaries using SAS Visual Analytics. Some of these examples will use parameters and one example will use the built-in functionality from the Report and Page prompt areas. If you are not familiar with the Report and Page prompt areas, please refer to this post, but the key behavior to understand is that any control objects placed in these areas automatically filter the report and/or page(s) objects. Report prompts filter all objects on all pages in the report for that data source and mapped data sources and Page prompts filter all objects on that current page for that data source and mapped data sources.

 

I’ve broken this topic down into a four part article series to make it easier to consume and to save you from copious amounts of scrolling. The accompanying video tutorial is available and the below examples are linked to their corresponding timestamps in the video.

 

The control objects and examples I will cover in this article series include:

Example 1: Slider (Range)

The first example will use a Slider control object with the Range Input Style Option and leverage the built-in functionality which will automatically filter objects in all pages or the current page depending on where the Slider is placed. Since my example report has multiple pages, I will not place this control object in the Report prompt area since I do not want to filter all the pages, just this current page. That means, this control object is a Page prompt.

 

This Slider control object with the Range Input Style Option has two end points that can be either dragged or a single click on the end point will enable you to select a value using a calendar picker to adjust the filter range.

 

Using the Slider (Range) is viable when you have a reasonable amount of dates to select from thereby making the slider end points easy to navigate. If you find you have a high volume of dates spanning several decades, then the Slider (Range) may make it difficult to easily use the end point sliders to select the desired range. Some of the other examples I will cover in this article series, such as the Drop-down List or Text Input may make it easier for your report users to select to and from date values.

 

01_Example1_Slider_Range.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

The technique used in this example will follow these steps:

  1. Expand the Report or Page prompt area
  2. Add a Slider (Range) control object
  3. Assign Roles

Step 1: Expand the Report or Page prompt area

In this example, we will use the Page prompt area. Use the page’s overflow menu and select Expand page controls.

 

02_ExpandPageControls.png

Step 2: Add a Slider (Range) control object

Next, drag the Slider control object into the Page prompt area.

 

03_AddSlider.png

Step 3: Assign Roles

Now we need to assign the corresponding roles. You can do this by using the Roles pane or by dragging the data item onto the Slider control object. By default, the Slider uses the Range Input Style Option, so nothing needs to be done for that configuration.

 

04_AssignRoles.png

 

Complete! The Page prompt is designed to automatically filter all objects on that page that shares the same data source or any data sources where data mappings have been defined. If you are interested in how to configure prompts with different data sources check out this article or video tutorial.

 

How to prompt for a date range in a SAS Visual Analytics report (series of articles):

Other References

Comments

Hello 

Any help to find the shortcomings from the following SAS project ?? - it is not producing the expect results from reference Stat book 

DATA data SeedGerm;
Input Temperature Germination;
CARDS;
70 1
73 1
78 1
64 1
67 1
71 1
77 1
85 1
82 1
50 0
63 0
58 0
72 0
67 0
75 0
;
Proc CATMOD;
Direct Temperature;
Model Germination = Temperature;
Run;
Quit;

 

 

shaterian:  I would not recommend PROC CATMOD with the DIRECT statement for the data that you have.  You have too many categories in your temperature variable.  See the documentation, https://support.sas.com/documentation/onlinedoc/stat/151/catmod.pdf p. 2140 and p. 2172  "Computational difficulties might occur if you have a continuous variable with a large number of unique values and you use this variable in a DIRECT statement, since an observation often represents a separate population of size one. At this extreme of sparseness, the weighted least squares method is inappropriate since there are too many zero frequencies. Therefore, you should use the maximum likelihood method. PROC CATMOD is not designed optimally for continuous variables; therefore, it might be less efficient and unable to allocate sufficient memory to handle this problem, as compared with a procedure designed specifically to handle continuous data. In these situations, consider using the LOGISTIC or GENMOD procedure to analyze your data."  I hope this is helpful.  beth.ebersole@sas.com

Hello

Dear BethEbersole

Thanks a lot for the response -

after I followed the lead - in log-window I have got the following "Note"

"" NOTE: PROC LOGISTIC is modeling the probability that germination='0'. One way to change this to model the probability that germination='1' is to specify the response variable option EVENT='1'. ""
 

 It is building a model based germination ="0" which apposite to general feature of germination = '1'  "

I used automatically recommended EVENT='1' in front of  Model - it did not take " EVENT " per recommendation. 

 

Proc Logistic plots=all;
Model Germination= Temperature/ 'germination' EVENT= '1';   
Any recommendation to change to Predicted Prob. for germination = 1??
 
As shown below  - Probability VS Temperature Graph is in opposite direction of the graph in the reference book - since Predicted Prob. for germination =0 not = 1

 

 Germination  and Temp.png

 

Hi shaterian.  Let's take this offline to discuss.  Email me at beth.ebersole@sas.com and we can set up a time to chat on Monday.  Alternatively, you can try SAS Technical Support 919-677-8008 or support@sas.com; they probably have someone who can help you more quickly. 

Version history
Last update:
‎06-04-2020 01:00 PM
Updated by:
Contributors

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags