Post

3 followers Follow
0
Avatar

Assigning Point Values Using If Statements

Hello Podio community! 

I am trying to assign point values using number fields (Quality Average, for example). I need to assign points based on greater than / between values like this: 

Score
If 95.00 or greater = 1
If 90 - 94.9 = 2
If 80 - 89.9 = 3
If 79.9 or below = 4

How do I use Podio calculations to accomplish this?

Eve Peters

Please sign in to leave a comment.

2 comments

1
Avatar

Hello, it's kind of

if (@Number >= 95) {1}
else if (@Number <= 94.9 && @Number >= 90) {2}
else if (@Number <= 89.9 && @Number >= 80) {3}
else if (@Number < 79.9) {4}

http://joxi.ru/Drl4gnOHv6zdwr

Алексей Шильников 1 vote
1
Avatar

Or shorter:

var n = @number field;
n < 80 ? 4 : n < 90 ? 3 : n < 95 ? 2 : n >= 95 ? 1 : 0

Rainer Grabowski 1 vote