Transfer data

Post Reply
Houps
Posts: 14
Joined: Tue Aug 31, 2021 12:04 pm
OLAP Product: Cognos Analytics
Version: 10.2.2
Excel Version: 2017

Transfer data

Post by Houps »

Hello, i need to transfer data in measure from 02->03->04 cubes.
Could someone help me with rule?
Form{Flat are in Measure{ST{CopyDataDetail.
I try do
IF ( !Form{Flat @= DB('ST{02.02.CopyDataDetail',!Orgstructure,!Scenario,!Version,!Rows,'4') );
['Measure{ST{CopyDataDetail':'4']=S:DB('ST{02.02.CopyDataDetail',!Orgstructure,!Scenario,!Version,!Rows,'4');
ENDIF;
but it doesn't work
Last edited by Houps on Thu Sep 02, 2021 8:11 pm, edited 1 time in total.
Adam
Posts: 124
Joined: Wed Apr 03, 2019 12:10 am
OLAP Product: IBM PA
Version: 2.0.9.x
Excel Version: Microsoft 365 x64

Re: Transfer data

Post by Adam »

Hi Houps,

I saw you registered earlier today, welcome to TM1 Forum!

I’m going to use the code-tag to make your script and mine easier to read.

If I understand right, you're trying to write the following rule:

Code: Select all

IF ( !Form{Flat @= DB('ST{02.02.CopyDataDetail',!Orgstructure,!Scenario,!Version,!Rows,'4') );
['Measure{ST{CopyDataDetail':'4']=S:DB('ST{02.02.CopyDataDetail',!Orgstructure,!Scenario,!Version,!Rows,'4');
ENDIF;
Appreciate what you're trying to do; You inadvertently created a hybrid of a rule and a turbo integrator script. This is evident by mixing of ['area statements'] - a hallmark of rules, and ENDIF; which is part of turbo integrator. TM1 doesn't quite work this way.
  • Rules are applied to cubes.
  • Turbo Integrator scripts are applied to processes.
  • You cannot mix the two.
Try this rule in cube ST{02.03.CopyDataDetail -- newlines and tabs are added for readability.

Code: Select all

['Measure{ST{CopyDataDetail':'4'] = S: IF(
	!Form{Flat @= DB('ST{02.02.CopyDataDetail',!Orgstructure,!Scenario,!Version,!Rows,'4'),
		DB('ST{02.02.CopyDataDetail',!Orgstructure,!Scenario,!Version,!Rows,'4'),
		STET);
The if statement works just like an Excel IF(cond,true,false) statement.

Don't forget, you'll need a feeder in cube ST{02.02.CopyDataDetail:

Code: Select all

SKIPCHECK;

# ... rules go here ...

FEEDERS;

# ... other feeders go here ...

# You need to substitute a value for XXXXX and YYYYY immediately below. You need to tell TM1 which Year{Month and Form{Flat to feed.
['Measure{ST{CopyDataDetail':'4'] => DB('ST{02.03.CopyDataDetail', !Orgstructure, !Scenario, !Version, 'XXXXX', 'YYYYY', !Rows, '4');
Also, in case you'd like more general pointers on TM1 rules, I posted on this not too long ago.

Let us know how you make out.
I've started blogging about TM1, check it out: www.havaslabs.com

Take care,
Adam
Houps
Posts: 14
Joined: Tue Aug 31, 2021 12:04 pm
OLAP Product: Cognos Analytics
Version: 10.2.2
Excel Version: 2017

Re: Transfer data

Post by Houps »

Big thank. It's help.
My code is:

Code: Select all

['Measure{ST{CopyDataDetail':'4'] = S: IF(
	!Form{Flat @= DIMNM('Form{Flat',  DIMIX('Form{Flat', DB('ST{02.02.CopyDataDetail',!Orgstructure,!Scenario,!Version,!Rows,'4'))),
		DB('ST{02.02.CopyDataDetail',!Orgstructure,!Scenario,!Version,!Rows,'4'),
		STET

And feeders:

Code: Select all

['Measure{ST{CopyDataDetail':'5'] => DB('ST{02.03.CopyDataDetailRow', !Orgstructure, !Scenario, !Version, DB('ST{02.02.CopyDataDetail',!Orgstructure,!Scenario,!Version,!Rows,'3'), DB('ST{02.02.CopyDataDetail',!Orgstructure,!Scenario,!Version,!Rows,'4'), !Rows, '5');
it's work
But a have a question. How i can load data from 02.03 to 02.04? "Rows" dimension make me :cry:
User avatar
Steve Rowe
Site Admin
Posts: 2456
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: Transfer data

Post by Steve Rowe »

Assuming we are talking about numeric data then you would need to have a consolidation of all elements in the rows dimension and then rule or TI the data at that level.
Technical Director
www.infocat.co.uk
Houps
Posts: 14
Joined: Tue Aug 31, 2021 12:04 pm
OLAP Product: Cognos Analytics
Version: 10.2.2
Excel Version: 2017

Re: Transfer data

Post by Houps »

I can add consolidate element in the Rows dimension.
Something like this.


How it can help me?
Last edited by Houps on Thu Sep 02, 2021 8:11 pm, edited 1 time in total.
User avatar
Steve Rowe
Site Admin
Posts: 2456
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: Transfer data

Post by Steve Rowe »

When you reference 02.03 from 02.04 you need to replace !Rows with '0'.

Maybe I am missing something...
Technical Director
www.infocat.co.uk
Post Reply