If you have never worked with OLAP code – then you might be curious how it works and what it looks like. Some developers use SAS OLAP Cube Studio to start their cube building process since it saves some of the typing required. Let’s review some of the code. [Adv Users: check out Steve’s posts about OLAP Code] Exporting PROC OLAP Code There are two methods to export your cube to a SAS program from SAS OLAP Cube Studio. Use Method 1 after you have added custom measurements. Click cube name > Export Code. The Export Code window appears. Use Method 2 after you have completed the Cube Designer wizard. Click the Export Code button. The Export Code window appears. From the Export Code window you can select if you want standard (long) OLAP procedure code or the shorten code. Either way – just add the path and program name. [More at SAS Support about when to use short/long form. ] Under the Hood After opening the BUILD_GA_BLOGSITE.sas program in Enterprise Guide, you see how the OLAP procedure code appears. You can learn to code your own cubes, just by reviewing how the OLAP wizard wrote the code. For instance, […]
Tag: measures
Info Map: I want an Average not a Sum!
In Information Map Studio, you can easily set the default measure for a data item in the Properties area.
(1) Use the Default aggregate function drop-down to select the default. When you set this item to AVERAGE, the data item defaults to Average t…
Info Map: Why does the data item show as scientific notation?
When a data item is created in Information Map Studio, the defaults are assigned for classifications and aggregations. If the data item is a percentage, this defaults may not make sense. For instance, the following figure shows the Gross Margin in scientific notation instead of a percentage. When the data item was imported, the default aggregation method was SUM, which does not work in this case. The gross margin is your profit from this sale and it should remain constant or in other words. So how do you fix it? You need to change the default measurement for the data item. For a value like Gross Margin, there is not reason to aggregate this data item – when is a sum of all Gross Margins for a customer or product used? For this item, the gross margin is associated with the Product data item. Any product no matter to which customer in any region, the gross margin remains constant. You have to select a default aggregation method, so I chose Average. I thought it would make the most sense to the end user. I could have also used Minimum. In the following figure, minimum would have set the value to […]