Troubleshooting
Problem
This document describes what a tuple is and how the tuple function works in query specifications.
Resolving The Problem
The tuple function serves to specify the specific context that a filter, sort order or another function (such as value() or rank()) will operate against. A tuple indicates which coordinates of the cube are in use for the operation being executed.
Here are some examples of the tuple function being used...
Within a Query Expression that filters:
Simple use case:
The tuple function serves to specify the specific context that a filter will operate against. In the case of a filter such as ?Top 10 SalesPeople for Q1 of 2012?, the context would likely be the measure (e.g. revenue) and the member 2012 Q1.
Syntax:
TopCount( children of salespeople, 10, tuple([Revenue], [2012 Q1]) )
If a dimension is not represented in the tuple function for a filter, then the default member of each dimension is used for the context.
Within a Query Expression using the Rank function:
Syntax:
rank(<measure> <ordinal direction> TUPLE <member being ranked> WITHIN SET <visible members on opposite axis>)
Simple use case:
User wants to see the rank of each Product Line for the year 2012.
rank(currentMeasure DESC tuple [2012] WITHIN SET [Product Line])
NOTE: In this case, the context used by tuple is not placed in brackets.
Historical Number
1019080
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21339536