Concatenate dimension value in a cube measure

Post Reply
Rosanero4Ever
Posts: 54
Joined: Thu Oct 18, 2012 5:08 pm
OLAP Product: Cognos TM1
Version: 10.1.1
Excel Version: 2010
Location: Italy

Concatenate dimension value in a cube measure

Post by Rosanero4Ever »

Hi all,

I have a cube made up by 4 dimensions and 4 string measures.
A measure might be calculated (by a rule) concataining the other 3 measure and the dimension values as follows (it's an example):
TM1_example.png
TM1_example.png (2.38 KiB) Viewed 2421 times
M1, M2 and M3 can be cancatenated using :
['M4'] = ['M1'] | ['M2'] | ['M3'];
How can I reference the dimension values in the above formula?
Thank you so much for your time.
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Concatenate dimension value in a cube measure

Post by declanr »

Rosanero4Ever wrote: M1, M2 and M3 can be cancatenated using :
['M4'] = ['M1'] | ['M2'] | ['M3'];
How can I reference the dimension values in the above formula?
Thank you so much for your time.
You can reference the dimension elements by using the ! bang symbol but your measure references will also need to be changed as the square bracket shorthand doesn't work for strings.

Code: Select all


['Measure 4'] =S: !Dim1 | !Dim2 | !Dim3 | !Dim4 | DB ( 'Cube', !Dim1 , !Dim2, !Dim3, !Dim4, 'Measure 1' ) | DB ( 'Cube', !Dim1 , !Dim2, !Dim3, !Dim4, 'Measure 2' ) | DB ( 'Cube', !Dim1 , !Dim2, !Dim3, !Dim4, 'Measure 3' );

Declan Rodger
Post Reply