How do I write Feeders about "IF" condition for consolidation

Post Reply
kidyee
Posts: 11
Joined: Mon Jan 05, 2015 2:16 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

How do I write Feeders about "IF" condition for consolidation

Post by kidyee »

Hi All,
I'm Korea language user. so, my English is not good. understand me.

Let's get start! My situation.

first. when I did n't use "SKIPCHECK" and "FEEDERS" then ['TOT_Origin_Agent', 'Ratio(rest)'] cell was well showen consolidation calculation below First Red box of picture.
Image

But. when I used "SKIPCHECK" and "FEEDERS" then ['TOT_Origin_Agent', 'Ratio(rest)'] cell was not showen consolidation calculation below second Red box of picture.

Code: Select all

SKIPCHECK;
#TEU interface cube로 부터 Origin Agetn TEU 값을 가져옴
['TEU'] = DB('int_data', !Year, !Months, !Origin Agent, 'TOT_Destination_Agent', 'TOT_Container_Size', 'TOT_Container_Type', 'TEU');
['Ratio'] = ['TEU'] / ['TOT_Origin_Agent', 'TEU'];

#### Question coding #####
['Ratio(rest)'] = N:if( ['Ratio(aj)'] <> 0 , 0, ['Ratio']);

FEEDERS;
['TEU'] => ['Ratio'];

#### Questino coding ####
['Ratio(aj)'] => ['Ratio(rest)'];
Image

Anyone ansewer me. thank you.
Wim Gielis
MVP
Posts: 3229
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 do I write Feeders about "IF" condition for consolidation

Post by Wim Gielis »

From what I read above, I would test this conditional feeder:

Code: Select all

FEEDERS;
['TEU(aj)'] => DB( IF( [Ratio(aj)']=0, 'int_data', ''), !Year, !Months, !Origin Agent, !Destination_Agent, !Container_Size, !Container_Type, 'Ratio(rest)');
Dimension names are a guess because I cannot know them.

Also, remove the 2 feeders you have now.
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
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: How do I write Feeders about "IF" condition for consolidation

Post by David Usherwood »

Seems to me that since Ratio is a divide, you should use \ not / (to avoid zero errors).
For the feeder, you don't really need to conditionalise at all.
I think that you may also need to rethink the logic around ratio, ratio aj and ratio rest, but I'm not clear what you are trying to achieve so I'll leave that as a query.
So:
#TEU interface cube로 부터 Origin Agetn TEU 값을 가져옴
['TEU'] = DB('int_data', !Year, !Months, !Origin Agent, 'TOT_Destination_Agent', 'TOT_Container_Size', 'TOT_Container_Type', 'TEU');
['Ratio'] = ['TEU'] \ ['TOT_Origin_Agent', 'TEU'];

#### Question coding #####
['Ratio(rest)'] = N:if( ['Ratio(aj)'] <> 0 , 0, ['Ratio']);


FEEDERS;
['TEU'] => ['Ratio'],['Ratio(rest)'];
# keep this for your 'overrides'
['Ratio(aj)'] => ['Ratio(rest)'];
Post Reply