cubecognos-tm1

Seeking a way to look up element names of a dimension to replace data in a cube, in Cognos TM1


My apologies if the title sounds vague, but here's the situation.

There's this cube A that contains five dimensions. The data contained in the cube involves movie title codes classified under different categories.

There's this dimension - Let's call it DIM, that's not a part of this cube, and that which contains movie title names as its elements. These title names have the movie title codes as the alias.

I'm looking to match the movie title codes from the data in cube A with the movie titles in dimension DIM and display the movie title names, replacing the movie title codes in the cube.

I figure this can be done by using turbo integrator, with the appropriate dimension subset of DIM as the data source. But I'm not sure if it's technically possible to extract elements from a dimension subset and use them to populate a cube based on conditions. Is there a way to do this using TI at all? Any sort of help will be appreciated. Thanks in advance!


Solution

  • If you're trying to do what I think you're trying to do (and the question isn't the clearest one I've come across), then you've got it around the wrong way.

    I'm assuming that the cube contains strings, and each cell contains a movie title code, yes? And that you want to replace the title code with the actual name, which will be derived from the dimension?

    Then what you do is to use a view of the CUBE as the data source.

    For each record, on the DATA tab of the TI you take the value and use the DimensionElementPrincipalName function, passing the arguments ( DIM'sRealName, MovieTitleCodeFromDataSource ), to retrieve the title and store it in a custom variable.

    The second argument will be the alias of course, and the function will return the principal name which, you said, is the title.

    You then simply use a CellPutS statement to overwrite the value in the cube, since all of the other data source variables will provide you with the set of elements that you need to feed to CellPutS. (The "contents" of all of those variables should be set to Other, and the Variable Type to string, obviously.)