3 Replies Latest reply on Dec 6, 2018 2:25 PM by Michel Caissie

# Thresholds

Hi,

I've created a calculated field using and IF statement and applying a colour to indicate Thresholds.

This is what the if statement looks like:

IF SUM([Number of Records]) >70 THEN 'LOW'

ELSEIF SUM([Number of Records]) >25 AND SUM([Number of Records]) <70 THEN 'MID'

ELSEIF SUM([Number of Records]) <25 THEN 'HIGH'

END

What do I need to do if I would like the Threshold to say if the SUM([Number of Records]) >70 only for Admit age under 35 years - I've tried to create a parameter for Admit age and use that in the calculation but it comes up with errors?

Thanks

• ###### 1. Re: Thresholds

Create a calculation

if Year(Admit Datetime) < parameter then [Number of Records] end

and in your original calculation, replace [Number of Records]  with this new calc

Michel

• ###### 2. Re: Thresholds

Thanks,

That works but I have to calculate the thresholds on percentages as well as age groups:

What can I do if I need to show the following thresholds in one calculation?

IF SUM([Number of Records]) >70 only for Admit age under 35 years THEN 'LOW'

ELSEIF SUM([Number of Records]) >25 AND SUM([Number of Records]) <70 only for Admit age under 50 years THEN 'MID'

ELSEIF SUM([Number of Records]) <25 only for Admit age under 50 years THEN 'HIGH'

END

• ###### 3. Re: Thresholds

Then you would need  2 calculations in the same format I did and replace  parameter with 35 in one case and 50 in the other.

And if you want the user to be able to select the ages then you need two different parameter.