Easier way to deal with thresholds in Business Logic

While adding Business Logic in your report, there maybe a case wherein you want a different narration (language) to be driven basis different thresholds of a variable.

Now, these thresholds might need be customized as per different viewers of the report.

This is typically easy, if the variable and its thresholds are used only at few places in the report. However, lets consider a case wherein that variable is the core KPI of the report and its thresholds are put to use in almost every narrative of the report. In that case, it might be a bit hectic to edit the Business Logic at levels.

To simplify this situation, you can store the thresholds in a file and upload it in the tool.
Later, create different variables to store each threshold and use those variables at places where thresholds need to be included in the Business Logic.

Further, when the thresholds need to be varied, you can simply edit their values in the file and re-upload it. Hence, there is no need to edit the Business logic, since the values of the variables used shall vary automatically when the file with new values (updated values) is uploaded.

Example:
Consider you are narrating the intensity of growth in sales value.
And you have considered 2 thresholds 10% and 30% basis which you consider 3 conditions: <=10%, >10% and < 30% and >= 30%.

And in the business logic, you have added following conditions basis which the language changes:

CONDITION
growth <= 10:
LANGUAGE ‘There was a slight growth in sales’

CONDITION
growth >= 10 and growth < 30:
LANGUAGE ‘There was a significant growth in sales’

CONDITION
growth >= 30:
LANGUAGE ‘There was a huge growth in sales’

This shall work perfectly fine as defined. However, say the viewer of the report now demands that the growth showed be reported as huge only if it rises above 50% and that below 50% it should be reported as significant.

Pertaining to the Business Logic above, what this demand means is that instead of 30%, 50% needs to be used. You always have that option to edit the Business Logic to replace that value.

However, lets consider that you have stored the thresholds in following variables:
threshold_1 = 10
threshold_2 = 30

and your Business Logic looks like these
CONDITION
growth <= threshold_1 :
LANGUAGE ‘There was a slight growth in sales’

CONDITION
growth >= threshold_1 and growth < threshold_2:
LANGUAGE ‘There was a significant growth in sales’

CONDITION
growth >= threshold_2:
LANGUAGE ‘There was a huge growth in sales’

It is simple to just replace the value of threshold_2 with 50 and there is no need to look into the Business Logic.

DISCLAIMER: The thresholds and narratives mentioned above are for explaining the functionality of the idea presented herein. They don’t represent the actual requirement or the usual way of reporting a particular KPI in any report. Also, this idea takes into account the change in values of thresholds and not addition of newer thresholds.