Value of a tuple?

What is the value of a tuple? Is it the same as in the following?

Every tuple has a value (which might be null).
The value of a tuple is determined as follows:
    DeepSee finds the rows in the fact table that correspond to all the non-measure members used in the tuple expression.
    DeepSee then finds values for those rows as follows:
        If the tuple expression includes a specific measure, DeepSee finds the value of that measure for each relevant row of the fact table.
        If the tuple expression does not include a specific measure, DeepSee uses the default measure (typically, %COUNT).
    DeepSee aggregates those values together, using the aggregation function specified for the measure.

If yes, how can I find out the aggregate function for the measure in the Cube Architect?

Hi @Roland,

From a TM1 perspective, what information are you targeting to extract?

Cube data? Dimensions of a cube view?


Paul

1 Like

Hi Roland,

if you right-click a cell that that is either rule dereived or consolidated you can trace the calculation.
Just right-click the cell and select trace rule.

Is this what you want to know?

Cheers,

Marius

1 Like

@plim @mwirtz
I need to know the value of a tuple e.g. for use in Filter expression. What does the following comparison operator do? Notice that you are comparing a tuple to a number.

([IR Universe].[RU], [IR FI Universe Mapping Measure].[Until Serial]) = 0

Hi,

I am assuming that the cube is three dimensional and the dimensions in the cube are

  • IR FI
  • IR Universe
  • IR FI Universe Mapping Measure

Regarding:
([IR Universe].[RU], [IR FI Universe Mapping Measure].[Until Serial]) = 0

I understand that the code snipplet is part of a Filter operation, such as:

FITLER ( TM1SubsetAll([IR FI]), [IR FI Universe Mapping].([IR Universe].[RU], [IR FI Universe Mapping Measure].[Until Serial]) = 0)

So in this case the [cube].(element1, element2, …) statements is a lookup and evaluates to either a numeric or a string value, depending on the cell.

So in fact you are not comparing a tuple to anything. The tuple is just part of the look-up in the Filter statement.

Hope it helps.

Cheers,

Marius

@mwirtz Marius,
yes it is part of a filter operation. A Filter function has two arguments, a set expression and a logical expression. In the example below the logical expression performs two comparisons between tuples and numbers.
So again, I’m not sure what exactly does the following comparison do?

([IR Universe].[RU], [IR FI Universe Mapping Measure].[Until Serial]) = 0

Complete Filter call:

FILTER ( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [IR FI] )}, 0)} , 
    ([IR Universe].[RU], [IR FI Universe Mapping Measure].[Since Serial]) <= 20454 
    AND ([IR Universe].[RU], [IR FI Universe Mapping Measure].[Until Serial]) = 0
)

@mwirtz
I executed the following query, just selecting the tuple and I got a result with one cell and value 5720713.

SELECT 
 {
    ([IR Universe].[RU], [IR FI Universe Mapping Measure].[Until Serial])
 }
   ON 0 FROM [IR FI Universe Mapping] WHERE [IR Universe].[RU], [zSys Item Index][0001]

I just tried another select on tuples. He does an aggregation(in the example below a sum) over all rows that match the tuple, in this case returning the sum of all Until Serial that are in [IR Universe].[Finanzindex SLI]:

SELECT 
 {([IR Universe].[Finanzindex SLI], [IR FI Universe Mapping Measure].[Until Serial])}
   ON 0 FROM [IR FI Universe Mapping] WHERE [zSys Item Index].[0001]

@mwirtz

I think I understood what is happening now. The thing is if you don’t mention the [zSYS Item Index] dimension in the tuple expression, TM1 will take the default element of that dimension, in this case Total Items which will be the sum of all the items. Therefore a tuple expression like the following will return the sum of all Until Serial:

([IR Universe].[RU], [IR FI Universe Mapping Measure].[Until Serial])

Hi Roland,

How it works is if a dimension is omitted in the MDX then the default member for the dimension is assumed. In TM1 this is defined in the }HierarchyProperties cube for each dimension against the defaultMember property. If this property is blank then it is assumed that the default member for the dimension is first element (the element with index of 1 i.e. the elament returned by DimNm( dimension, 1 )

To be absolutely sure of what is being queried it is best to explicitly reference every dimension in the query.

1 Like