This article provides step-by-step calculation examples for common scenarios in Brilliant Assessments, including arithmetic from answers, score conversions, conditional logic, and date calculations. Use it as a companion to the Setting Up Calculations reference article.
Tip: If you are new to calculations, start by reading Setting Up Calculations for Assessments first. It explains the builder interface, selectors, and settings you will use in every example below.
On this page
- Before you start
- Example 1: Simple arithmetic from answers
- Example 2: Converting a percentage score to a Total score
- Example 3: Conditional logic driver (show or hide sections)
- Example 4: Assigning rating text with Case/When
- Example 5: Calculating days between dates
- Example 6: Rounding and formatting numbers
- Quick reference: Common patterns
- FAQs & Troubleshooting
Before you start
Scores are percentages:
- Scores in Brilliant Assessments are always calculated as percentages and stored as decimal values. For example, a score of 60% is stored as 0.60. This represents the percentage achieved, not the number of points or an average score.
- When comparing scores in formulas, always use decimal values (for example,
> 0.60), not whole numbers (for example,> 60). - To convert a percentage score to a 5-point Likert scale, multiply by 5 (for example,
0.60 * 5 = 3.0).
Result Calculation vs Score Calculation:
Every calculation has two formula boxes. The examples in this article use one or both depending on the scenario.
-
Result Calculation (top box) - generates a text or numeric value for reporting purposes. Display it using an
AnswerTextmerge string. - Score Calculation (bottom box) - generates a numeric value that contributes to scoring. Requires Max Points and should be linked to a segmentation.
If a calculation depends on the result of another calculation, place it in a separate subsection after the calculation it depends on. This ensures calculations execute in the correct order.
For a full explanation of both boxes and when to use each, see Setting Up Calculations for Assessments.
Tip:
To start building a formula, click the New Line button first. This creates the first line in the formula builder where you can begin adding tiles.
- Ensure you have populated the Test Response with sample answers so you can use the Test button to verify your formula.
Example 1: Simple arithmetic from answers
Scenario
Your assessment collects Annual Revenue and Annual Expenses as numeric answers. You want to calculate profit and display it in the feedback report.
Formula
Using the Answer Text selector, insert the two answer tiles with a minus operator between them:
{AnnualRevenue.AnswerText} - {AnnualExpenses.AnswerText}Setup
- Create a calculation in the same section as the revenue and expense questions (or any later section).
- Build the formula: Select Answer Text for the revenue question, then the - operator, then Answer Text for the expenses question.
- Set the result format: Check Result is Numeric, set Format to Currency, and Decimals to 2.
- Leave Calculate after Scoring unchecked (this formula uses answer values, not scores).
- Test the formula using the Test button. If your test response has Revenue = 500000 and Expenses = 350000, you should see 150,000.00.
Displaying in the report
Use the calculation's Question Number (shown at the top of the Modify Calculation pop-up) in a merge string to display the result. For example, if the calculation number is Q15:
{AnswerText.Text[QuestionNo=15]}
Example 2: Converting a percentage score to a total score
Scenario
Brilliant Assessments automatically calculates and reports scores as percentages (and Likert averages) at every level - assessment, section, subsection, and segmentation. However, you may want to display the total points scored for a section instead. For example, if a section has a maximum possible score of 50 points and the respondent scored 90%, you want the report to say "45 out of 50" rather than "90%".
The system does not have a built-in way to display total point scores for individual sections. This is where a calculation is needed - you convert the percentage back to a total by multiplying it by the section's maximum possible score.
Formula
{SectionName.Score} * 50This multiplies the section's percentage score (stored as a decimal) by the section's maximum possible points. If the section score is 0.90 (90%) and the maximum is 50, the result is 45.
Setup
- Create a segmentation to hold the calculated total score. This segmentation is used purely for reporting purposes. See Segmentations for how to set one up.
- Create a calculation in a section that appears after the section being scored, or at the end of the assessment. It is often a good idea to create a dedicated section at the end and select Individual Report as Section Type.
- Build the formula: Enter the formula in Score Calculation part. Use the Section Score selector to choose the section, then add the * operator, then use Free Text to enter the section's maximum possible points (for example, 50).
- Set Max Points (Potential Points) to match the section's maximum possible score (for example, 50).
- Link to the segmentation: Go to the Segmentations tab on the calculation and select the segmentation you created in Step 1.
- Test the formula. If the section score is 90%, you should see 45.
Example 3: Use Calculation to drive conditional logic (show or hide sections)
Scenario
You want to show a "Development Recommendations" section only if the respondent scores below 60% on a Leadership competency section.
Formula
Case When {LeadershipCompetency.Score} < 0.60 Then 'true' Else 'false' EndSetup
- Create a calculation in a section that appears before the section you want to conditionally show, and after the section being scored.
-
Build the formula using these tiles:
-
Logic selector:
Case -
Logic selector:
When - Section Score selector: Choose the Leadership section
-
Operators selector:
< -
Free Text:
0.60 -
Logic selector:
Then -
Free Text:
true -
Logic selector:
Else -
Free Text:
false -
Logic selector:
End
-
Logic selector:
- Check Calculate after Scoring.
-
Do NOT check Result is Numeric (the result must be the text string
'true'or'false'). - Link the condition: Go to the "Development Recommendations" section settings, open Conditions, and select this calculation from the dropdown.
Tip: The calculation must return the literal text strings 'true' or 'false'. Returning a number like 1 or 0 will not work as a condition driver.
Example 4: Rating text based on multiple score conditions
Scenario
When you need rating text that depends on a combination of conditions across multiple sections, for example, you want to display different feedback text based on whether both a "Strategy" section and an "Execution" section scored high or low, this is where a calculation with Case/When becomes essential.
Formula
In this example, we check the scores of two sections and return different text for each combination:
Case
When {Strategy.Score} < 0.60 and {Execution.Score} < 0.60 Then 'Both areas need development. Focus on building foundational skills in strategy and execution before advancing.'
When {Strategy.Score} < 0.60 and {Execution.Score} >= 0.60 Then 'Your execution is strong, but strategic thinking needs work. Consider leadership training to strengthen planning skills.'
When {Strategy.Score} >= 0.60 and {Execution.Score} < 0.60 Then 'You have strong strategic vision but need to improve follow-through. Focus on project management and accountability practices.'
Else 'Excellent performance across both areas. You are well-positioned for senior leadership responsibilities.'
EndThis produces four possible outcomes based on the high/low combination of two section scores:
| Strategy | Execution | Rating text returned |
| Below 60% | Below 60% | Both areas need development... |
| Below 60% | 60% or above | Your execution is strong... |
| 60% or above | Below 60% | You have strong strategic vision... |
| 60% or above | 60% or above | Excellent performance across both areas... |
Setup
- Create the calculation in a section that appears after both the Strategy and Execution sections have been scored.
-
Build the formula. Use the New Line button before each
Whento keep the formula readable.- Line 1:
Case - Line 2:
When{Strategy Section Score}<0.60and{Execution Section Score}<0.60Then'Both areas need development...' - Line 3:
When{Strategy Section Score}<0.60and{Execution Section Score}>=0.60Then'Your execution is strong...' - Line 4:
When{Strategy Section Score}>=0.60and{Execution Section Score}<0.60Then'You have strong strategic vision...' - Line 5:
Else'Excellent performance across both areas...' - Line 6:
End
- Line 1:
- Check Calculate after Scoring.
- Do NOT check Result is Numeric (the result is a text string).
-
Use the Copy Last Line button after building the first
Whenline. Then delete the tiles that differ and replace them. This saves time when you have multipleWhenconditions with similar structure.
Displaying in the report
Use the calculation's question number in a merge string to display the rating text:
{AnswerText.Text[QuestionNo=XX]}
Replace XX with the calculation's number.
Tip: You can combine conditions across any score types - sections, subsections, segmentations, or even answer values. For example, When {Section1.Score} >= 0.70 and {Subsection3.Score} < 0.50 Then 'text' is a valid condition. You can also add more When lines to handle additional combinations.
Note:
- Case/When evaluates conditions in order and returns the first match. The
Elseat the end catches any combination not explicitly listed above it. - If you need rating text based on a single section's score only, use the system's built-in Ratings feature instead - no calculation needed.
- For more complex combinations (three or more sections with multiple rating bands each), see Displaying Rating Text Based on Score Combinations which uses a weighted-score approach that scales better.
Example 5: Calculating days between dates
Scenario
Your assessment collects a "Project Start Date" as an answer. You want to calculate the number of days between that date and today.
Formula
DateDiff(day, {ProjectStartDate.AnswerText}, GetDate())Setup
-
Build the formula using these tiles:
-
Functions selector:
DateDiff() -
Functions:
Day - Answer Text: Select the date question
-
Functions selector:
GetDate -
Operators selector: for parentheses
()
-
Functions selector:
- Set the result format: Check Result is Numeric
Tip: The date answer must be in a recognized date format (for example, DD/MM/YYYY or MM/DD/YYYY depending on your assessment's language settings). If the respondent enters a non-date value, the calculation will return an error.
Example 6: Rounding and formatting numbers
Scenario
You are calculating a ratio from two answer values and want to round the result to 2 decimal places within the formula itself (for example, to use the rounded value in a subsequent calculation).
Formula
Round({Revenue.AnswerText} / {Headcount.AnswerText}, 2)Setup
-
Build the formula: Use the Functions selector to insert
Round. Then build the division inside the parentheses, and add Free Text2as the second parameter (number of decimal places). -
Set the result format: Check Result is Numeric. The format and decimal settings on the calculation form control how the value displays. The
Roundfunction controls the actual value stored.
Note:
- If you only need to control how the value displays in the report, you can skip
Roundand just set Number of Decimals in the result format options. The system will round automatically for display. - Use
Round()when the rounded value needs to be used in another calculation or when precise rounding matters for the stored result.
Quick reference: Common patterns
| What you want to do | Formula pattern |
| Add or subtract answers | {Answer1.AnswerText} + {Answer2.AnswerText} |
| Show/hide based on score | Case When {Section.Score} < 0.60 Then 'true' Else 'false' End |
| Assign text label from score | Case When {S.Score} < 0.40 Then 'Low' When {S.Score} < 0.70 Then 'Mid' Else 'High' End |
| Days since a date | DateDiff(day, {DateAnswer.AnswerText}, GetDate()) |
| Round a result | Round({Value.AnswerText} / {Divisor.AnswerText}, 2) |
| Convert number to text | Cast({Calculation.Result} As varchar) |
| Total score (not percentage) |
{Assessment.Score} * {TotalPossiblePoints} (See Reporting Total Scores ) |
FAQs & Troubleshooting
Use the questions below to troubleshoot common calculation issues.
Related articles
- Setting Up Calculations for Assessments - Full reference for the calculation builder interface and settings
- Reporting Total Scores - How to display raw point totals instead of percentages
- Displaying Rating Text Based on Score Combinations - Weighted score combinations with custom rating text
- Setting Up Validations - Input validation using the same formula framework
- Assessment Settings - Where to enable calculations for your assessment
Comments
0 comments
Please sign in to leave a comment.