Turbo Integrator: Any way to use or in an IF statement?

Post Reply
ChrisF79
Posts: 52
Joined: Mon Sep 20, 2010 2:20 pm
OLAP Product: IBM TM1
Version: 9.5.1
Excel Version: 2007 SP2

Turbo Integrator: Any way to use or in an IF statement?

Post by ChrisF79 »

Very new question here but I have a lot of IF statements that could be minimized if I could use OR within the first part of the clause. What I'm trying to write is something like, "If entity is 1000 or 5000, do this..." Currently I'm doing:

Code: Select all

IF(entity @= '1000');
  ... do something;
ENDIF;
IF(entity @= '5000');
   ... do something (same as above);
ENDIF;
I'm using Turbo Integrator 9.4.1. Thanks!
jrizk
Posts: 48
Joined: Thu Nov 19, 2009 10:38 pm
OLAP Product: Tm1
Version: 10.2.2
Excel Version: 2010

Re: Turbo Integrator: Any way to use or in an IF statement?

Post by jrizk »

Hi.

IF ( entity @= '1000' % entity @= '5000' );
... do something;
ENDIF;

check out Tm1 help on 'logical operators'
J.Rizk
Tm1 for everyone
jrizk
Posts: 48
Joined: Thu Nov 19, 2009 10:38 pm
OLAP Product: Tm1
Version: 10.2.2
Excel Version: 2010

Re: Turbo Integrator: Any way to use or in an IF statement?

Post by jrizk »

& = AND eg (Value1 > 5) & (Value1 < 10) Returns TRUE if the value is greater than 5 and less than 10.
% = OR eg (Value1 > 10) % (Value1 < 5) Returns TRUE if the value is greater than 10 or less than 5.
~ = NOT eg ~(Value1 > 5) Equivalent to (Value1 <= 5)
J.Rizk
Tm1 for everyone
ChrisF79
Posts: 52
Joined: Mon Sep 20, 2010 2:20 pm
OLAP Product: IBM TM1
Version: 9.5.1
Excel Version: 2007 SP2

Re: Turbo Integrator: Any way to use or in an IF statement?

Post by ChrisF79 »

Perfect, thank you! I remembered us going over it in a class I took but I couldn't find it anywhere. Thanks a lot!
User avatar
SueZhaZa
Posts: 17
Joined: Tue Feb 28, 2012 2:58 am
OLAP Product: TM1
Version: 9.2.5
Excel Version: 2003
Location: Malaysia
Contact:

Re: Turbo Integrator: Any way to use or in an IF statement?

Post by SueZhaZa »

jrizk wrote:& = AND eg (Value1 > 5) & (Value1 < 10) Returns TRUE if the value is greater than 5 and less than 10.
% = OR eg (Value1 > 10) % (Value1 < 5) Returns TRUE if the value is greater than 10 or less than 5.
~ = NOT eg ~(Value1 > 5) Equivalent to (Value1 <= 5)


Gee Thanks.. i know i'm bit outdated with the post but its helpful..
Actually i need to know more on picking up subset using csv files whereby some of the cell is either null or empty..
Thanks again! :D :D :D
vain, childish, talkative, dreamy, lazy, friendly, warm, lively, busy, complicated, bubbly, moody, kind, cruel, playful, irritating, forgetful, ironic, loud, open, protective, supportive, freak, rebellious, assertive - unique. like everyone else .exe
Christopher Kernahan
Community Contributor
Posts: 147
Joined: Mon Nov 29, 2010 6:30 pm
OLAP Product: Cognos TM1
Version: 10.1
Excel Version: Office 2010

Re: Turbo Integrator: Any way to use or in an IF statement?

Post by Christopher Kernahan »

Hi SueZhaZa,

Welcome to the forum.
Actually i need to know more on picking up subset using csv files whereby some of the cell is either null or empty..
Your question doesn't make sense to me; I suggest you create a new topic and provide more info as described in the How To Post Thread http://www.tm1forum.com/viewtopic.php?f=3&t=1037
User avatar
SueZhaZa
Posts: 17
Joined: Tue Feb 28, 2012 2:58 am
OLAP Product: TM1
Version: 9.2.5
Excel Version: 2003
Location: Malaysia
Contact:

Re: Turbo Integrator: Any way to use or in an IF statement?

Post by SueZhaZa »

yup.. i already did and manage to solve it... Love the helps this forum provides.. Superb!

http://www.tm1forum.com/viewtopic.php?f=3&t=7094
vain, childish, talkative, dreamy, lazy, friendly, warm, lively, busy, complicated, bubbly, moody, kind, cruel, playful, irritating, forgetful, ironic, loud, open, protective, supportive, freak, rebellious, assertive - unique. like everyone else .exe
Post Reply