How to map data element to dimension?

Post Reply
swati_phadtare
Posts: 14
Joined: Mon Mar 28, 2011 9:21 am
OLAP Product: TM1
Version: 9.5
Excel Version: 200

How to map data element to dimension?

Post 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
Wim Gielis
MVP
Posts: 3231
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: How to map data element to dimension?

Post 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.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
User avatar
Martin Ryan
Site Admin
Posts: 1989
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: How to map data element to dimension?

Post 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');
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
swati_phadtare
Posts: 14
Joined: Mon Mar 28, 2011 9:21 am
OLAP Product: TM1
Version: 9.5
Excel Version: 200

Re: How to map data element to dimension?

Post by swati_phadtare »

Thanks Martin, Thank you Wim. Suggested way fulfills my requirement.
Thank you all for quick & best solution.
Post Reply