H I have a text field that is calculating a few fields charttxt.Text - I want with another field tell with in a range or to summarise from 4 choices depending on the number resulted
With({input:Value(charttxt.Text)},
If(input >= 3, "Low",
input >= 4, "Intermediate",
input >= 9, "High",
input >= 15, "Very High",
"1"
)
)
I am only getting low or for example 1 when no score?
Thank you
Solved! Go to Solution.
Your conditions are wrong. Your first condition is >3 Your second is >4.
Now let's say the input is 5. Then it satisfies the 1st condition because 5 is greater than 3. That's why you always get Low. Try this code instead.
With(
{input: Value(charttxt.Text)},
If(
input >= 3 && input < 4,
"Low",
input >= 4 && input < 9,
"Intermediate",
input >= 9 && input < 15,
"High",
input >= 15,
"Very High",
"1"
)
)
Your conditions are wrong. Your first condition is >3 Your second is >4.
Now let's say the input is 5. Then it satisfies the 1st condition because 5 is greater than 3. That's why you always get Low. Try this code instead.
With(
{input: Value(charttxt.Text)},
If(
input >= 3 && input < 4,
"Low",
input >= 4 && input < 9,
"Intermediate",
input >= 9 && input < 15,
"High",
input >= 15,
"Very High",
"1"
)
)
Thank you @Abhilash_Swain I will try and learn Switch - I have only just come across this
User | Count |
---|---|
144 | |
97 | |
89 | |
78 | |
56 |
User | Count |
---|---|
194 | |
186 | |
105 | |
99 | |
91 |