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!
Picklist with IF statement question
-
- 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
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.
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.
Re: Picklist with IF statement question
Asvlad,
The 'Value' element is numeric. Your answer worked. Thank you!
The 'Value' element is numeric. Your answer worked. Thank you!