# Advanced Ratings: Conditional Statements and Functions

## Introduction

*This area of SchemeServe is more complex than most others. In order for you to make the most out of using our Help Guide for developing your own rates, it would be best if you read all the parts of this guide in order. To help you with this they are listed in numerical order in the “See Also” section of each page. You can click on a link to take you to section 1 and then move through logically at your own pace.*

## Conditional Expressions

There are several conditional expressions that can be used to generate rating formulae in SchemeServe:

**MAX([Q1_Cover], [Q2_Cover]**) This expression is used to take the*maximum value*from alternate expressions

**MIN([Q1_Cover], [Q2_Cover])**This expression is used to take the minimum value from alternate expressions

**SQRT(Q1_Cover]/2 * [Q2_Cover]^2)**This expression provides the*square root*of the values in the statement

**CEILING([Q1_Rate]*0.123)**– this expression*rounds up*the value of the statement

**FLOOR([Q1_Rate]*0.123)**– this expression*rounds down*the value of the statement

**ROUND([Q1_Rate]*0.123)**- this expression*rounds the figure to the nearest number specified*

**IF(conditional_expression, value_if_true, value_if_false)**– this is a conditional statement

**Note:** IF statements can be confusing:

IF([Q1_Cover]+[Q2_Cover] >= 1000 AND [Q3_Value] = 'A little bit more', [Q4_Cover] * 0.2, [Q4_Cover])

*It is sometimes easier to use the old SchemeServe syntax for this kind of command:*

e.g. Answer:Q3,Formula:[Q1_Cover]+[Q2_Cover],SetCover:Q4
Yes,1000-999999,[Q4_Cover] * 0.2

## See Also:

- Introduction to Rates in SchemeServe
- Uploading SchemeServe Rating Files
- Downloading SchemeServe Rating Files
- Flat Rating: Building Your First SchemeServe Rating File
- Conditions for Rating Files
- Actions for Rating Files
- Rating Modifiers: What they are and when to use them
- Multi-Step Ratings: Using Multiple Sections in Rating Files
- Advanced Ratings: Using Formulae
- Advanced Ratings: Conditional Statements and Functions
- Advanced Ratings: Rounding Values
- Master Rating: Using Tables and Row Lookup Loops
- Example Ratings for Specific Insurance Types (Life and Public Liability)
- Mathematical Helper Functions for Ratings Files
- Rating Agents: Tips and Tricks