0

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!

Kenzo_Tenma
  • 11
  • 1
  • 8

1 Answers1

2

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.)

Alan K
  • 1,957
  • 3
  • 19
  • 30
  • Dear Alan, Thank you! But I'm afraid this wouldn't work in my case. I should've explained this before. Sorry! The movie title code AND the movie title name are aliases in the dimension DIM. However the principal name in the dimension closely resembles the movie title code. For eg: 750000037621 is a movie title code in the cube while the principal name in the dimension is 00000750000037621. Let me reiterate that while the second number is the principal name in the dimension, the aliases include the first number (the movie title code from the cube) and the movie title name. – Kenzo_Tenma Oct 16 '15 at 05:48
  • 1
    @Kenzo_Tenma : If the title code value in the cube is an alias, it will still be able to identify the correct element. There is only one thing that you would need to do differently. Rather than using the DimensionElementPrincipalName function to get the movie title, you would instead use the ATTRS(dimension, element, attribute) function to read the movie title's alias. The rest works out the same way. – Alan K Oct 16 '15 at 05:51
  • Dear Alan, my sincere apologies for the delayed reply. I was caught up with something for the past couple of days. It works now! Thank you very much! :) – Kenzo_Tenma Oct 21 '15 at 10:37