If the text you want to display depends on a straightforward section, subsection, or assessment score, use Ratings-Based Text directly. See How do I show different text in the report based on a respondent's score?
This article covers a different situation: when the text should be driven by a combination of scores or a custom condition rather than a single natural score. Examples include "show this commentary only when two sections are both high", "display this text when the gap between two scores exceeds a threshold", or "display a different message for each combination of results".
The worked example below drives three different messages from the combination of two section scores: one message when both sections are high, another when both are low, and nothing when the result is mixed.
The recommended approach is to convert the condition into a score, store that score in a dedicated segmentation, and attach the report text as rating text on that segmentation.
When to use this approach
Use this method when any of the following apply:
- The same condition needs to drive more than one block of report text.
- The report text is long or requires formatting (bold, line breaks, multiple paragraphs).
- The trigger is a derived condition (a comparison, a ranking, or a threshold) rather than a single section or subsection score.
Step 1: Write a score calculation that returns points for your condition
Create a calculation and build your logic in the Score Calculation area (the lower box), not the Result Calculation area. Return a different point value for each outcome you want to report on. In this example, return 2 when both sections are high (above 80%), 1 when both are low (below 50%), and 0 for every other combination:
Case
When {SectionA.Score} > 0.80 AND {SectionB.Score} > 0.80 Then 2
When {SectionA.Score} < 0.50 AND {SectionB.Score} < 0.50 Then 1
Else 0
End
Note that section scores are returned as decimals, so 80% is written as 0.80 and 50% as 0.50. Replace the section names and thresholds with the values that define your own rule.
For a simple yes or no condition, the same structure returns 1 when the condition is met and 0 when it is not:
Case
When [your condition] Then 1
Else 0
End
Step 2: Set Potential Points and Calculate After Scoring
On the same calculation:
-
Set Potential Points to the highest value your formula can return. In the two-section example the highest value is
2, so set Potential Points to2. For a simple yes or no condition, set it to1. - Select Calculate After Scoring whenever the formula references any score (assessment, section, subsection, or segmentation).
A Score Calculation is always stored as a percentage of Calculated Score / Potential Points. With Potential Points set to 2, the result resolves to exactly:
- 100% when both sections are high (2 of 2)
- 50% when both sections are low (1 of 2)
- 0% for every other combination (0 of 2)
Step 3: Link the calculation to a dedicated segmentation
Create a new segmentation (for example, "Section Combination"), then open the calculation's Options tab and link it to that segmentation. The segmentation now holds the calculated score for every response.
Use a dedicated segmentation for this purpose so the value is not mixed with any other scoring.
Step 4: Build an Advanced Rating with the text
On the segmentation, create an Advanced Rating with one band per outcome. Each band is defined by its maximum score, and a result falls into the first band whose maximum it does not exceed. For the two-section example, create three bands:
| Outcome | Stored score | Band maximum score | Report text |
| Mixed result | 0% | 10% | Leave empty (or enter neutral text) |
| Both sections low | 50% | 60% | Enter the "both low" paragraph |
| Both sections high | 100% | 100% | Enter the "both high" paragraph |
Because the segmentation only ever resolves to exactly 0%, 50%, or 100%, each result lands cleanly in one band. The 0% result falls into the first band (which is left empty, so nothing displays for a mixed result), the 50% result falls into the second band, and the 100% result falls into the third. The band maximums (10%, 60%, 100%) simply need to sit between the possible stored values so there is no overlap.
For a simple yes or no condition, the same method uses just two bands: one with a maximum of 99% left empty, and one with a maximum of 100% carrying your paragraph.
Step 5: Insert the rating text merge string
In your Word report template, insert the rating text merge string for the segmentation at the position where the paragraph should appear. The text entered on the matching band will display automatically. You can place the same merge string in more than one location if required. For merge string basics, see What is a merge string, and how do I use one?
Comments
0 comments
Please sign in to leave a comment.