News
Abstract
As of the fix to PH24729, the TM1 Server now introduces consistency on query results returned based on the logic described here.
Content
The ordering is axis-major, axis 0, 1, ..., then slicer. Within each axis and slicer, hierarchies appear e.g. left-to-right (rows), top-to-bottom (columns), in order written (slicer). Each hierarchy has optional columns representing DIMENSION PROPERTIES props, in order written in the query. Finally CELL PROPERTIES columns appear in order written. If there is no CELL PROPERTIES clause in the query, the built-in NVALUE/SVALUE variables will pick up the cell values, and that'll be the last column.
If the author writes a complete query, not relying on defaults, then they have control over the order.
For queries that don't use any DIMENSION PROPERTIES or CELL PROPERTIES clauses and where the slicers for these queries are complete (meaning every cube dimension is accounted for via explicit hierarchy references on axes and slicer), the rowset to expect has 1 column for each hierarchy in the query. The TurboIntegrator process should declare one variable per hierarchy, plus an endmost variable for the NVALUE/SVALUE built-in variable. The order of these variables will be the column hierarchies first, in top-to-bottom stacking order as seen in the application UI such as Planning Analytics Workspace, then the rows hierarchies, in left-to-right stacking order as seen in the UI, then the slicer hierarchies, in the order displayed in the context in the UI, then the value.
For simple queries you can see this ordering in the actual query text, but for more complex cases the UI will be the easier way to see this ordering.
If DIMENSION PROPERTIES are included in the actual query, they'll result in extra columns that will be grouped with each hierarchy. Example:
SELECT
{ [D1].[H1].[M1] }
*
{ [D2].[H2].[M2] }
DIMENSION PROPERTIES MEMBER_CAPTION, LEVEL_UNIQUE_NAME ON COLUMNS FROM [cube] WHERE ...
The variables for the columns axis will be in the order:
[D1].[H1].[M], MEMBER_CAPTION(M1), LEVEL_UNIQUE_NAME(M1), [D2].[H2].[M2], MEMBER_CAPTION(M2), LEVEL_UNIQUE_NAME(M2)
If CELL PROPERTIES are included in the query, they'll result in columns at the end, one per cell property, in the order written in the query.
Was this topic helpful?
Document Information
Modified date:
15 September 2021
UID
ibm16489261