If function not working in calculated field

Getting expression incomplete error

=if((${score}>=70 AND ${score} < 79), '5',
if((${score}>=80 AND ${score} < 89), '10',
if(${score} >90 , '20', '-5'))))

If the score is between those figures, people can earn 5, 10, 20 or lose -5 points. 

0 1 243
1 REPLY 1

You had an extra close parenthesis. Looker does support CASE statements in your calculated fields as well (e.g.,https://www.googlecloudcommunity.com/gc/Exploring-Curating-Data/Looker-Case-When-Table-Calculations/...)

 

 

Top Labels in this Space
Top Solution Authors