Hi @Anonymous ,
Could you please share more details about your scenario? What is the data source you are working with? What is the "key" you referred?
As per your screenshot, I suspect that some of the conditions are included in other conditions, so the key point is how to write the if statement: the range of the operand need to be larger and larger. For instance, in your example, if scores are integers, you could set a collection that includes numerical values which covering the whole range of scores, then set variables that each one includes numbers meet one condition, in Screen's OnVisible:
ClearCollect(colInt,Sequence(100));
Set(var1,Filter(colInt,Value < 8));Set(var2,Filter(colInt,Value >= 8));Set(var3,Filter(colInt,Value >= 5 && Value<=6));
Then on the Text of the Label, set below formula:
If(TextInput1.Text in var3, "Yellow", TextInput1.Text in var1, "Green",TextInput1.Text in var2,"Red")
So if you type in 6 in TextInput box, the Label returns Yellow, type in 4, returns Green, and so on.
You could see that Yellow range is included by Green range, so Yellow range condition need to be in front of Green range, and Red range is not intersected with others so place that condition at last.
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.