OR in if statement in TI

Post Reply
jcblough
Posts: 18
Joined: Tue Mar 20, 2012 3:08 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2010

OR in if statement in TI

Post by jcblough »

does this exist, I have the following statement:

['Forecast', '06XW'] =N: IF(('ESP Sales' @= !SSP_m), Continue, 0);

It is zeroing out values for an entire level of a cube sans the measure 'ESP Sales' I want it to leave ESP Sales and another value, is there a proper 'or' structure? "OR", '|', and '||' do not work.
lotsaram
MVP
Posts: 3703
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: OR in if statement in TI

Post by lotsaram »

Do a search for "tm1 logical operators"
User avatar
Michel Zijlema
Site Admin
Posts: 712
Joined: Wed May 14, 2008 5:22 am
OLAP Product: TM1, PALO
Version: both 2.5 and higher
Excel Version: 2003-2007-2010
Location: Netherlands
Contact:

Re: OR in if statement in TI

Post by Michel Zijlema »

jcblough wrote:does this exist, I have the following statement:

['Forecast', '06XW'] =N: IF(('ESP Sales' @= !SSP_m), Continue, 0);

It is zeroing out values for an entire level of a cube sans the measure 'ESP Sales' I want it to leave ESP Sales and another value, is there a proper 'or' structure? "OR", '|', and '||' do not work.
The OR operator is represented by "%".

But in your case you could change the rule to:

['Forecast', '06XW', {'ESP Sales', 'another value'}] =N: 0;

Michel
User avatar
jim wood
Site Admin
Posts: 3958
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: OR in if statement in TI

Post by jim wood »

Indeed. They can found in the reference guide.
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
jcblough
Posts: 18
Joined: Tue Mar 20, 2012 3:08 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2010

Re: OR in if statement in TI

Post by jcblough »

Thanks, I've seen alot of things, but "%" for OR is a new one.
Alan Kirk
Site Admin
Posts: 6647
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: OR in if statement in TI

Post by Alan Kirk »

jim wood wrote:Indeed. They can found in the reference guide.
And a link to that section of the guide was included under the "Frequently Referenced Sections" heading of the FAQ.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
User avatar
jim wood
Site Admin
Posts: 3958
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: OR in if statement in TI

Post by jim wood »

A link can also be found under the help menu with Architect / Server Explorer. Spoilt for choice really!!! :D

(Not to forget the PDF version in doc library.)
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Post Reply