Picklist with IF statement question

Post Reply
JJ2
Posts: 19
Joined: Sun May 09, 2010 11:28 pm
OLAP Product: TM1
Version: 9.5
Excel Version: 2007

Picklist with IF statement question

Post by JJ2 »

Hi Everyone,

I have created a static picklist by adding an attribute to a string element in a dimension. The string element with the static picklist is called Status. The cube containing the dims is called Flag.
I am trying to write a rule in the Flag cube that automatically populates the 'Value' cell with a '1' or a '0' based on the value in the cell with the picklist (Status). The value selected is either Actual or Forecast. If actual is selected in the Status element, the Value element should show 1 else 0.
The rule I have is:
['Value'] = S:IF(DB('Flag', !Month, 'Status')@='Actual','1','0');
I know it's a simple question but I'm new to TM1. I greatly appreciate any advice.
Thank you!
asvlad
Posts: 27
Joined: Wed Mar 17, 2010 2:41 pm
OLAP Product: TM1, Transformer, EP, MSAS
Version: 2.0.6
Excel Version: 2016
Location: Russian Federation

Re: Picklist with IF statement question

Post by asvlad »

What is type of "Value" element?

In case that type of "Value" is "N", your rule must be following:
['Value'] = N:IF(DB('Flag', !Month, 'Status')@='Actual',1,0);

In case that type of "Value" is "S", you have correct rule.
JJ2
Posts: 19
Joined: Sun May 09, 2010 11:28 pm
OLAP Product: TM1
Version: 9.5
Excel Version: 2007

Re: Picklist with IF statement question

Post by JJ2 »

Asvlad,

The 'Value' element is numeric. Your answer worked. Thank you!
Post Reply