Subject: if function error Posted: 6/11/2020 Viewed: 4494 times
I am currently facing problems with the application of the 'if-function' as provided in the Expressions Builder.
For instance, I want to define that the annual water use rate of an irrigation node is 5000 m^3/ha up until the year 2033, when the application of measures reduces demand to 4000 m^3/ha.
For this purpose, I type in:
If(year <= 2033, 5000, 4000)
Yet, however, this leads to the error 'incorrect number of parameters to function if. Expected 3, but had 1.'
I assume that sometimes is wrong with the Else Function, yet cannot spot out why.
Thank you for your suggestions!
Ms. Anne Hereford
Subject: Re: if function error Posted: 6/11/2020 Viewed: 4452 times
This is often a problem of delimeters. Whether to use commas (",") or decimals (".") depends on a setting on your computer. Have you tried replacing the commas with decimals?