SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 46447: The ORDER function might return incorrect results when the default measure is used in both the set and the numeric expression parameters

DetailsHotfixAboutRate It

As shown below, the syntax for the ORDER function uses both a set and a numeric expression as the parameters:

ORDER(<set> [,<numeric expression>],[ASC|DESC|BASC|BDESC]])

Under the following conditons, the ORDER function returns incorrect results:

  • The set contains two or more measures.
  • One of the measures is the default measure for the cube.
  • The default measure is also used in the numeric expression.

In the following example, the set used by the ORDER function is a crossjoin of three dimensions: CARS, Measures, and DATE. Specifically, members of the CARS dimension are crossed with the two measures SALES_SUM (the default) and SALES_N. The crossing of the CARS members and the measures is then crossed with members of the DATE dimension.

SELECT ORDER ( CROSSJOIN ( {[CARS].[CAR].MEMBERS} , CROSSJOIN ( {[Measures].[SALES_SUM], [Measures].[SALES_N]} , {[DATE].[DTE].MEMBERS} ) ), ([Measures].[SALES_SUM]), ASC ) ON COLUMNS FROM [MDDBCARS]

Instead of correctly listing both SALES_SUM and SALES_N for each combination of the CARS members and the DATE members, only SALES_N is returned, as shown below:

                All DEALERS
   Chevy Number of values for SALES   January
   Chevy Number of values for SALES   January
   Chevy Number of values for SALES  February
   Chevy Number of values for SALES  February
Chrysler Number of values for SALES   January            1
Chrysler Number of values for SALES   January            1
Chrysler Number of values for SALES  February            1
Chrysler Number of values for SALES  February            1

Click the Hot Fix tab in this note to access the hot fix for this issue.

After the hot fix is applied, both SALES_SUM and SALES_N are listed for each combination of the CARS members and the DATE members.

                  All DEALERS
   Chevy               Sum of SALES   January
   Chevy               Sum of SALES  February
   Chevy Number of values for SALES   January
   Chevy Number of values for SALES  February
Chrysler               Sum of SALES   January      $20,000.00
Chrysler               Sum of SALES  February      $20,000.00
Chrysler Number of values for SALES   January               1
Chrysler Number of values for SALES  February               1 


Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS OLAP Serverz/OS9.2 TS2M39.3 TS1M2
Microsoft® Windows® for 64-Bit Itanium-based Systems9.2 TS2M39.3 TS1M2
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.2 TS2M39.3 TS1M2
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.2 TS2M39.3 TS1M2
Microsoft Windows XP 64-bit Edition9.2 TS2M39.3 TS1M2
Microsoft® Windows® for x649.2 TS2M39.3 TS1M2
Microsoft Windows Server 2003 Datacenter Edition9.2 TS2M39.3 TS1M2
Microsoft Windows Server 2003 Enterprise Edition9.2 TS2M39.3 TS1M2
Microsoft Windows Server 2003 Standard Edition9.2 TS2M39.3 TS1M2
Microsoft Windows Server 2003 for x649.2 TS2M39.3 TS1M2
Microsoft Windows Server 20089.2 TS2M39.3 TS1M2
Microsoft Windows Server 2008 for x649.2 TS2M39.3 TS1M2
Microsoft Windows XP Professional9.2 TS2M39.3 TS1M2
Windows 7 Enterprise 32 bit9.2 TS2M39.3 TS1M2
Windows 7 Enterprise x649.2 TS2M39.3 TS1M2
Windows 7 Home Premium 32 bit9.2 TS2M39.3 TS1M2
Windows 7 Home Premium x649.2 TS2M39.3 TS1M2
Windows 7 Professional 32 bit9.2 TS2M39.3 TS1M2
Windows 7 Professional x649.2 TS2M39.3 TS1M2
Windows 7 Ultimate 32 bit9.2 TS2M39.3 TS1M2
Windows 7 Ultimate x649.2 TS2M39.3 TS1M2
Windows Vista9.2 TS2M39.3 TS1M2
Windows Vista for x649.2 TS2M39.3 TS1M2
64-bit Enabled AIX9.2 TS2M39.3 TS1M2
64-bit Enabled HP-UX9.2 TS2M39.3 TS1M2
64-bit Enabled Solaris9.2 TS2M39.3 TS1M2
HP-UX IPF9.2 TS2M39.3 TS1M2
Linux9.2 TS2M39.3 TS1M2
Linux for x649.2 TS2M39.3 TS1M2
OpenVMS on HP Integrity9.2 TS2M39.3 TS1M2
Solaris for x649.2 TS2M39.3 TS1M2
* 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.