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


About WEAP

Home
Why WEAP?
Features
What's New?
Sample Screens
Demonstration
Publications
History and Credits

Using WEAP
Download
Licensing
User Guide
Tutorial
Videos (YouTube)

User Forum
Discussions
Members List
Edit Profile

Additional Support
Training
University Courses
Collaboration

About Us
SEI-US Water Resources Program
Please Contact Us

LEAP
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: 6552 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!
Regards
Jana






Ms. Anne Hereford

Subject: Re: if function error   
Posted: 6/11/2020 Viewed: 6510 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,
Anne
Topic "if function error"