Usage Note 38802: Calculating the absolute value in MDX for a measure in a SAS® OLAP cube
In SAS® 9.2, you can use Base SAS functions in MDX, and therefore the ABS function will be available to you when defining a calculated measure, like:
ABS( [Measures].[Prior_Year_Sales] )
For SAS 9.1.3, you can use logic like the following in the denominator to get the absolute value calculated:
IIF( [Measures].[Prior_year_Sales] < 0, -[Measures].[Prior_year_Sales], [Measures].[Prior_year_Sales] )
Operating System and Release Information
| SAS System | SAS OLAP Server | z/OS | 9.1 TS1M0 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M0 | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M0 | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M0 | |
| Microsoft Windows 2000 Advanced Server | 9.1 TS1M0 | |
| Microsoft Windows 2000 Datacenter Server | 9.1 TS1M0 | |
| Microsoft Windows 2000 Server | 9.1 TS1M0 | |
| Microsoft Windows 2000 Professional | 9.1 TS1M0 | |
| Microsoft Windows NT Workstation | 9.1 TS1M0 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M0 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M0 | |
| Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M0 | |
| Microsoft Windows XP Professional | 9.1 TS1M0 | |
| 64-bit Enabled AIX | 9.1 TS1M0 | |
| 64-bit Enabled HP-UX | 9.1 TS1M0 | |
| 64-bit Enabled Solaris | 9.1 TS1M0 | |
| HP-UX IPF | 9.1 TS1M0 | |
| Linux | 9.1 TS1M0 | |
| OpenVMS Alpha | 9.1 TS1M0 | |
| Tru64 UNIX | 9.1 TS1M0 | |
*
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.
| Type: | Usage Note |
| Priority: | |
| Topic: | Query and Reporting ==> OLAP (Online Analytical Processing)
|
| Date Modified: | 2012-05-17 16:47:36 |
| Date Created: | 2010-02-19 10:33:07 |