Page 1 of 1

How to map data element to dimension?

Posted: Wed Dec 21, 2011 7:13 am
by swati_phadtare
Hi All,
I have a requirement where I am trying to map data element to element of a dimension.
My Source cube has 'dealers' & 'sales value' in Measure dimension ie(data elements)
My Target cube has 'sales value' in Measure dimension but dealer is a separate dimension (Not a Measure dimension).
I want to copy 'sales value' from source to target where 'dealer' of source is equal to 'dealer' of target. (but problem is ''dealer' in source is in Measure dim and not in a separate & 'dealer' in target is a separate dim)
Logically if we think then its not possible to map data element to a dimension.
Is there any trick or workaround for this? Have anyone tried something like this?
Thanks & Regards

Re: How to map data element to dimension?

Posted: Wed Dec 21, 2011 11:26 am
by Wim Gielis
Hi there

That's possible.

Are you using the TI wizard or are you coding the process yourself?
In any case, how does the CellPutN statement currently looks like?
We will change the arguments to write to a different cube dimension structure.

Re: How to map data element to dimension?

Posted: Wed Dec 21, 2011 7:56 pm
by Martin Ryan
To do this I'd create a view that pulled the "Sales Value" into a TI process then as part of the Data tab you can write a cellgets that retrieves the dealer from the same place as the Sales Value has just been pulled from. Then you can use the dealer as an element. You will probably also need to update the Dealer dimension as you go.

For example

Code: Select all

#Metadata tab
sDealer=cellgets(sourceCube, v1, v2, v3, v4, 'Dealer');
if(dimix('Dealer', sDealer)=0);
  DimensionElementInsert('Dealer', '', sDealer, 'n');
  DimensionElementComponentAdd('Dealer', 'All Dealers', sDealer, 1);
endif;

Code: Select all

# Data tab
sDealer=cellgets(sourceCube, v1, v2, v3, v4, 'Dealer');
cellputn(value, targetCube, v1, v2, v3, v4, sDealer, 'Sales Value');

Re: How to map data element to dimension?

Posted: Fri Dec 23, 2011 4:54 am
by swati_phadtare
Thanks Martin, Thank you Wim. Suggested way fulfills my requirement.
Thank you all for quick & best solution.