IBM Apptio

IBM Apptio

 View Only

The IF Function 

Sun March 15, 2015 02:14 PM

You may also need to write conditional statements. For example, in the Cost Source Master Data set, you need to identify whether a row is labor or not. This is done through a column called Is Labor which is expecting a yes or no value. You’ll likely need to create a column using an IF statement to determine the yes or no response. For example, you might want to write a formula that looks at the Cost Pool and, if the Cost Pool is Internal or External Labor, then return a yes value, otherwise return a no value.

 

The syntax for IF is:

 

If(condition, true_statement, false_statement)

 

In the example of the Is Labor column, the formula might be:

 

If(Cost Pool IN ("External Labor","Internal Labor"), "yes", "no")

 

For more information about the IF syntax, please refer to the Online Help > Studio Guide > Formulas and Functions > Functions > IF.





#CostingStandard(CT-Foundation)

Statistics
0 Favorited
5 Views
0 Files
0 Shares
0 Downloads

Comments

Wed February 03, 2016 08:05 AM

Julie,

 

     You are correct, your false statement value would simply be $_.  That would return the value of the column you are currently in.  For instance, if I have a column listing States (see example below) and you wanted the column showing Washington to return WA, in the value override field for the States Column your formula would look like this:  =if($_="Washington","WA",$_).  This statement is saying if this column (States) equals Washington, then return WA, otherwise return the value in this column.

 

 

States
AZ
AK
MD
NC
SC
Washington
ID

#CostingStandard(CT-Foundation)

Wed February 03, 2016 07:06 AM

When using a IF formula and you wanted to return the original value in the field if the formula didn't return anything what would need to be entered?

 

_$ comes to mind but I'm not 100% sure.

 

Thank you


#CostingStandard(CT-Foundation)