Prompts: How do I use a Date Range Prompt?

After some not-so careful consideration, I decided to take the SAS BI Content Developer exam.  Some folks I know who have passed the exam recommended that I study how to work with prompts and stored processes.  So I am making up examples and working through some exercise drills of my own creation (oooh … scary).  I am noticing some of the features and nuisances of working with the Date Range prompts. When I started using stored processes several years ago, it was not quiet this easy to setup date prompts, so the prompts are a welcome improvement. In this example, a Proc Tabulate summarizes the sales by location and date.  The Date Range prompt allows the user to select a custom date range between Jan 1995 and December 1998. This figure shows how the prompt looks and the results. Check if the User is Insane … I like this prompt because it does have some built in “sanity” checks. For instance, I tried to make the end date before the start date and it didn’t like it.  You can see it generated an error message. This capture is a little dramatic with a date of June 1900. If using Jan 1996 […]

Automatically Generate Days of the Month

Run a monthly report and absolutely hate having to change the macro variables? Luckily SAS has the handy intnx function to make your life easier. The following code will automatically generate the date for the first / last day of the previous month.  Modify the -1 to however many previous months you need to adapt […]

SAS MS Add-In: Why are there two variables with almost same name?

Recently while setting up a report in SAS Add-In for MS Excel, I was going to create a graph using an information map. When trying to assign the chart values, I realized I had several very confusing  variable names.  When the information map was created, I know I had everything neat looking due to my own OCD about variable names. As shown in the following figure, the red boxes with the  (1) – you can see the names are confusing.  Turns out Name_2 and Order Month_2 were variables I had copied to create new variables.  After changing the options to (2) Show Labels – my wonderful (3) variables names were there. This turned out to be an important change, the Name_2 was actually the Customer name “decoded” and the variable called customer was a custom format I had applied to the customer variable. In the second list, you’ll notice that Customer (after the Sales measure) turned into Group. Making it Permanent You may want to advise your users to update their Options so the labels are always used. From the SAS ribbon, select Tools > Options. In the Data tab, select Display labels instead of variable names from the Settings […]

Choosing the Right Pumpkin

Contributed by Memsy Price, Product Marketing Manager, SAS  Here in North Carolina, October is a magical month. Temperatures and the humidity return to bearable levels and the landscape turns into a classic postcard image of autumn. One of my favorite…