I have a data set that has a running total column. I want to assign the top 80% as "Fast", between 80%-90% as "Medium" and the bottom 10% as Slow.
When I do an If statement, I can't get past the middle section of the formula for the range of percentages.
IF [RunTot_% of dmd] < "80.01" THEN "F"
ELSEIF [RunTot_% of dmd] < "80" AND [RunTot_% of dmd] > "90" THEN "M"
ELSE "S"
ENDIF
Any insights?
Solved! Go to Solution.
Hi @michael2529
Is the datatype of [RunTot_% of dmd] double or string ? If its double (number) then it should be
IF [RunTot_% of dmd] < 80.01 THEN "F"
ELSEIF [RunTot_% of dmd] < 80 AND [RunTot_% of dmd] > 90 THEN "M"
ELSE "S"
ENDIF
If you provide some sample data or snapshot of error we can help you.
Hi @michael2529
Is your [RunTot_% of dmd] field a numeric field? To check values based on this field, you will likely want it to be numeric. Then, in that case, you will not need quotation marks around the numbers in your if statement.
Also, it looks like you're checking if the value is less than 80 and greater than 90. A number cannot be both of these, so maybe you wanted to say greater than 80 and less than 90?
Hope this helps!
@Kenda wrote:Hi @michael2529
Also, it looks like you're checking if the value is less than 80 and greater than 90. A number cannot be both of these, so maybe you wanted to say greater than 80 and less than 90?
@Kenda has made a great point. You might need to change the condition like below.
IF [RunTot_% of dmd] < "80.01" THEN "F"
ELSEIF [RunTot_% of dmd] > "80" AND [RunTot_% of dmd] < "90" THEN "M"
ELSE "S"
ENDIF
Thank you! I forgot to change the formula output to a double so now it worked!
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |