"Recalculate failed" error for iif spreadsheet function in Statistica

"Recalculate failed" error for iif spreadsheet function in Statistica

book

Article ID: KB0072767

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.3 and later

Description

This article explains a situation where "Recalculate failed" error is received when executing iif spreadsheet function in Statistica. 

The "iif" function written looks correct with below standard usage:
----------------
iif(condition, expression1, expression2)

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

For example,  NewVariable = iff( V1 <0, 1, 0)
----------------  

Issue/Introduction

The "Recalculate failed" error is received when executing iif spreadsheet function in Statistica. The syntax of iif function look correct as "iif(condition, expression1, expression2)".

Environment

Windows

Resolution

Different regional settings in the client machine requires the user writing the iif function differently. 

In a machine with US regional format setting where list separator is a comma "," , the user should write iif function with comma "," as argument separator, that is, 
NewVariable = iff( V1 <0, 1, 0)
In a machine with a Non-US regional format setting where list separator is a semi-colon ";" (for example, Denmark-Denmark) , the user should write iif function with semi-colon ";" as argument separator, that is, 
NewVariable = iff( V1 <0; 1; 0)

A iif function written with comma as argument separator "iff( V1 <0, 1, 0)" will throw error "Recalculate failed" when being executed in a machine with a regional format setting where the list separator is semi-colon ";".
Vice versa. 
A iif function written with semi-colon as argument separator "iff( V1 <0; 1; 0)" will throw error "Recalculate failed" when being executed in a machine with a regional format setting where the list separator is comma ",".

Users can go to Windows Control Panel > All control panel items > Region > Format > Additional settings to check the "List Separator" setting. 

The argument separator used in the iif function should match the regional format setting (list separator) in the machine where the function will be executed.