Welcome to WEAP's Website WEAP
WEAP is an initiative of the Stockholm Environment Institute.

About WEAP

What's New?
Sample Screens
History and Credits

Using WEAP
User Guide
Videos (YouTube)

User Forum
Members List
Edit Profile

Additional Support
University Courses

About Us
SEI-US Water Resources Program
Please Contact Us

Environmental News
'Subterranean estuaries' crucial to sustainable fishing and aquacultur...
Pioneering research suggests 'subterranean estuaries' may be critical in managing sustainable fishing and aquaculture --...

Chemicals from human activities in transplanted oysters far from popul...
Wastewater treatment facilities clean the water that goes down our sinks and flushes our toilets, but they do not remove...

Antarctic Circumpolar Current flows more rapidly in warm phases
Our planet's strongest ocean current, which circulates around Antarctica, plays a major role in determining the transpor...
Source: Science Daily
Interested in Energy?
Read about LEAP: SEI's software for energy planning.

Link WEAP and LEAP for combined Water-Energy planning.
Watch a video demo!

User Forum

All Topics | Topic "if function error"
Log in to post new messages or reply to existing messages.
Author Message
Ms. Jana Balzer

Subject: if function error   
Posted: 6/11/2020 Viewed: 1465 times
Dear all,

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: 1425 times
Dear Jana,
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?

Best regards,
Topic "if function error"