"iif" function in transformation of variables

"iif" function in transformation of variables

book

Article ID: KB0074276

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.3,13.2,13.1,13.0,12.7

Description

This article introduces how to use "iif" function in transformation of variables.
 

Issue/Introduction

iif function in transformation of variables

Resolution

iif(condition, expression1, expression2)

If "condition" is non-zero (satisfied), then "expression1" is returned from the function, else "expression2" is returned.

A simple example is demonstrated at below:
 "New_Var = IIF(V1 < 10, 1, 0)"--- This is to create a variable named "New_Var": being 1 if the variable V1 (the first variable in the spreadsheet) is less than 10 and being 0 if V1 is equal to or larger than 10. 

 

 

Additional Information

Legacy Article ID: 178830