In one minute (and 10 seconds, but are you measuring that?) you can add a custom measure (also known as calculated members) to your OLAP cube. Watch this video to create a simple calculation multiplying units * price. Remember that this mechanism is not just used for multiplications, you can
Uncategorized
“Do you really serve M&Ms every Wednesday? Tell us the story!” clamored a wide-eyed class after sampling the M&Ms lighting up the breakout area. Seeing how hard they worked on their exercises, it seemed ok to have a slight diversion from technology. Besides as you’ll find out, the story has
Yesterday, December 7, 1941, a date which will live in infamy... - Franklin D. Roosevelt Today is the 70th anniversary of the Japanese attack on Pearl Harbor. The very next day, America declared war. During a visit to the Smithsonian National Museum of American History, I discovered the results of
Water and wastewater treatment plants are among the most complex facilities built and maintained by utility companies, whether public or private. Each facility contains thousands of pieces of equipment worth millions of dollars that must operate in concert for the many complex treatment processes to function effectively. The consequences of these assets
In simulation studies, the response variable is often a binary (or Bernoulli) variable. Often 1 is used to indicate "success" (or the occurrence of an event) whereas 0 indicates "failure" (or the absence of an event). For example, the following SAS/IML statements define a vector x of zeros and ones:
Consultant Frederick Pratter continues his winning streak with this third edition of Web Development with SAS by Example. Web programmers of all levels will appreciate Frederick's many real-world examples and clean delivery. Speaking of delivery, I'd encourage those of you who attend SAS Global Forum and regional user group conferences to seek out Frederick if
When I was a teenager in the 1980s I purchased my first computer: a TI-99/4A. (Wow, TI's version numbers are more confusing than ours!) I had several friends who had other brands of computers, including the TRS-80 (affectionately known as the "trash 80") and the Commodore 64. Despite our divisions
Recently the "SAS Sample of the Day" was a Knowledge Base article with an impressively long title: Sample 42165: Using a stored process to eliminate duplicate values caused by multiple group memberships when creating a group-based, identity-driven filter in SAS® Information Map Studio "Wow," I thought. "This is the longest
26.2! If you smiled when you read that number, then you are likely one of the cognoscenti who ran a marathon or know somebody that ran a marathon. If you didn’t recognize that number, then by now you may have guessed that it is the number of miles in a
On this blog, I've delivered a few tips about using SAS formats to stratify your data values "in place" without having to actually change your data. The most recent example addressed date and datetime variables. My previous examples included simple SAS programs that you can run in SAS display manager
The other day someone posted the following question to the SAS-L discussion list: Is there a SAS PROC out there that takes a multi-category discrete variable with character categories and converts it to a single numeric coded variable (not a set of dummy variables) with the character categories assigned as
I got an email asking the following question: In the following program, I don't know how many variables are in the data set A. However, I do know that the variable names are X1–Xk for some value of k. How can I read them all into a SAS/IML matrix when
I have previously written about how to create funnel plots in SAS software. A funnel plot is a way to compare the aggregated performance of many groups without ranking them. The groups can be states, counties, schools, hospitals, doctors, airlines, and so forth. A funnel plot graphs a performance metric
The heatmap is a graphical representation of a table where colors are used to represent the values in the table. This is an effective graphic for finding the minimum and maximum values across the table and may surface patterns in the data. With the addition of the HEATMAPPARM statement to
Yes, it’s a holiday week, which means Thanksgiving-related posts and people telling you what they’re thankful for. You know it, you love it. So here’s my shot: I’m thankful for new editions. That’s right—second editions, third editions—if it’s new and updated, I’m all for it. Go with me on this….
Here's a quick tip to keep in mind when you write SAS/IML programs: although the SAS/IML documentation lists about 300 functions that are built into the SAS/IML language, you can also call hundreds of functions in Base SAS. Furthermore, you can pass in SAS/IML vectors for arguments to the functions.
Paul Goodwin's Hot New Research column is a must-read in each issue of Foresight. The current column, "High on Complexity, Low on Evidence: Are Advanced Forecasting Methods Always as Good as They Seem?" ends with this sage advice: If the name of a method contains more words than the number of observations that
If you’ve taken one of my SAS classes you may recall “Mark’s 3 rules of programming”, the first of which is “Lazy programmers are GOOD programmers.” One of the things I love about best about SAS programming is the plethora of functions and shortcuts built into the language, all designed
Halloween night was rainy, so many fewer kids knocked on the door than usual. Consequently, I'm left with a big bucket of undistributed candy. One evening as I treated myself to a mouthful of tooth decay, I chanced to open a package of Wonka® Bottle Caps. The package contained three
Rick posted a tip today about using abbreviations in the SAS program editor window (often referred to as the "enhanced editor"). Defining abbreviations is a great way to save keystrokes and re-use "templates" of code that you've squirreled away. (One of Rick's readers also picked up on the tip, and
I recently attended The Education Trust’s 2011 National Conference on closing gaps and raising achievement for ALL students. This was my first Ed Trust event and I walked away baffled by the data about the inequities in our education system, and the persistent gaps between the affluent and impoverished. First,
When I moved last year from Denver to the Washington, DC area people told me to prepare myself for the long hours I would spend in my car. I had no idea. It takes forever to get anywhere. Once, during a snowstorm it took me 9 hours to drive 10
Did you know that you can define "abbreviations" in the SAS enhanced editor? These handy little shortcuts can save you a lot of typing. For example, I have an abbreviation for the string _iml. Whenever I type _iml, the editor prompts me to replace those four characters with the following
Here is a little trick to file away. Given a row vector of zeros and ones, thought of as representing a number in base 2, the following SAS/IML statements compute the decimal value of that vector. proc iml; x = {1 0 0 1 1 1}; /* number in base
I've been working with date-time data on a recent project, and I've come across a few SAS programs that have "opportunity for improvement" when it comes time to create reports. (Or maybe I haven't, and I contrived this entire blog post so that I could reference one of my favorite
One aspect of blogging that I enjoy is getting feedback from readers. Usually I get statistical or programming questions, but every so often I receive a comment from someone who stumbled across a blog post by way of an internet search. This morning I received the following delightful comment on
If you want to extract values from a SAS/IML vector, use the subscripting operation, such as in the following example: proc iml; x = {A B C D E}; y = x[{1 2 3}]; /* {A,B,C} */ The vector y contains the first three elements of x. However, did you
Mean Absolute Percent Error (MAPE) is the most commonly used forecasting performance metric, and for good reason, the most disparaged. When we compute the absolute percent error the usual way, as APE = | Forecast - Actual | / Actual this is undefined when Actual = 0. It can also lead to
You can still get a paper proposal in for SAS Global Forum 2012. All you need is an idea. And probably some data. And also, some techniques for analyzing that data. Oh, and some conclusions would be helpful as well. I know: you are a busy person! You might not
Sometimes you want to label only certain observations in a plot. This is useful in many ways, but one use is to label outliers on a scatter plot. In the SGPLOT procedure, the DATALABEL= option enables you to specify the name of a variable that is used to label observations.