# Difference between revisions of "Advanced Ratings: Using Formulae"

(→Using Formulae) |
(→Using IF Statements within Rating) |
||

Line 28: | Line 28: | ||

==Using IF Statements within Rating== | ==Using IF Statements within Rating== | ||

− | |||

− | Using OR | + | IF([Question1_Value]='Yes','1000','10') |

+ | |||

+ | |||

+ | '''Using OR''' | ||

IF([Question1_Value]='Yes' OR [Question2_Value]='Yes','1000','10') | IF([Question1_Value]='Yes' OR [Question2_Value]='Yes','1000','10') | ||

− | Using AND | + | '''Using AND''' |

IF([Question1_Value]='Yes' AND [Question2_Value]='Yes','1000','10') | IF([Question1_Value]='Yes' AND [Question2_Value]='Yes','1000','10') |

## Revision as of 13:12, 27 June 2017

## 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.*

## Using Formulae

If you wish to make your ratings more dynamic then it's OK to use formulae in your rating files. You can develop formulae using these toolsets Mathematical Operations, Conditional Statements and Functions and Rounding Values for Formulae.

*We've provided a couple of example formulae here:*

SetCover based on answer

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

This formula changes the rating for Q4_Cover based on a positive answer to Q3 and the results of the Formula

SetCover days difference between 2 values

SetCover:Days ([DateEnd_DateValue]-[DateStart_DateValue]).Days

This formula calculates the number of days between any two given dates.

## Using IF Statements within Rating

IF([Question1_Value]='Yes','1000','10')

**Using OR**

IF([Question1_Value]='Yes' OR [Question2_Value]='Yes','1000','10')

**Using AND**

IF([Question1_Value]='Yes' AND [Question2_Value]='Yes','1000','10')

You can use any of the conditional statements and functions in a formula and it's important to pay attention to rounding values too.

## 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