Calculation
Using the 'Calculation' step in the builder to define complex calculations
Last updated
Using the 'Calculation' step in the builder to define complex calculations
Last updated
Define complex calculations you can use for final prices or rates based on the inputs in the rest of your model.
How might you use the 'Calculation' step?
If you've creating a pricing model for insurance, you'll need to calculate premiums as well as a variety of rates and commissions.
Once you've added the 'Calculation' step and named it, like you will with any other step in the Build tool (more on that here), you'll need to write your calculation.
To get started, click the cog symbol in the top right of the 'Calculation' step.
There are three fields to complete for this step.
This will be the key that you will use in all subsequent expressions and calculations, including in the final 'Output' step of your model, so it will need to be unique, descriptive, and easy to understand.
You can use letters, symbols and numbers, but no spaces.
This is the formula for your final calculation.
Here's an example of how you would structure an formula multiplying your base price against your vehicle peril risk factor and driver peril risk factor, rounding the result:
round({{driver_peril}} * {{vehicle_peril}} * {{base}}, 4)
To learn how to structure your expression in more detail and to see the full list, check out our full page on Syntax. Here you can learn how to structure your expression in more detail, debug and see a full glossary.
This is the default value you want to set for the calculation.
This is the data the model will default to should any values not return as expected.
Once you're happy with your calculation, just press the 'Save' button in the top right of the screen. You're now ready to head back to the 'Build' screen.