SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 33526: Relative time calculations can be created in SAS® Web Report Studio reports that include a Time dimension

DetailsAboutRate It

If your report is based on an OLAP data source that includes a Time dimension, you can create these custom calculations:

  • the difference in a selected measure over a previous period or previous year.
  • the percentage change of a selected measure over a previous period or previous year.
  • a selected measure’s cumulative value to the current period.
  • Note: The cumulative function starts over with each calendar year.

Note: In addition to specifying that the dimension type is Time, you also must assign a type to each level in the Time hierarchy. The following screen capture from the Cube Designer wizard shows that the Year level has a type of YEAR, the Quarter level has a type of QUARTERS, and the Month level has a type of MONTHS.

image label

To create a relative time calculation, perform these steps in the Select Data dialog box:

  1. Click the Custom tab.
  2. Select a measure in the Available measures field.
  3. Select one of the options in the Functions drop-down list.
  4. image label

  5. Click the arrow button to place your relative time expression in the Expression field. The expression is evaluated based on the aggregated values of the measures that you selected. (Within SAS Web Report Studio, it is not possible to produce a detailed calculation.)
  6. Click Add to add your custom data item to the New items box.
  7. Here is a percent change over previous year calculation:

    image label

    Here are the results:

    image label

Note: You cannot type an expression that uses a relative time function. You must select the measure, then select the function, then click the arrow button to place the calculation into the Expression field. You also cannot edit the expression.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS Web Report StudioMicrosoft® Windows® for x643.19.1 TS1M3 SP4
Microsoft Windows 2000 Advanced Server3.19.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server3.19.1 TS1M3 SP4
Microsoft Windows 2000 Server3.19.1 TS1M3 SP4
Microsoft Windows 2000 Professional3.19.1 TS1M3 SP4
Microsoft Windows NT Workstation3.19.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter Edition3.19.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise Edition3.19.1 TS1M3 SP4
Microsoft Windows Server 2003 Standard Edition3.19.1 TS1M3 SP4
Microsoft Windows XP Professional3.19.1 TS1M3 SP4
64-bit Enabled AIX3.19.1 TS1M3 SP4
64-bit Enabled Solaris3.19.1 TS1M3 SP4
HP-UX IPF3.19.1 TS1M3 SP4
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.