I am trying to put together an expression that looks at several different possible values:
What i want:
If Speed > 70 then = Speed - 30
If Speed is lower than 70 but higher than 30 then = Speed -15
If Speed lower than 30 then = Speed
I put this as my expression which i know is wrong but i cannot figure it out:
IF([Speed] > 70, [Speed] - 30, [Speed]), AND IF([Speed] < 70, [Speed] - 15, [Speed])
Solved! Go to Solution.
If it works, itโs correct!
You could also use IFS():
IFS(
([Speed] > 70),
([Speed] - 30),
([Speed] > 30),
([Speed] - 15),
TRUE,
[Speed]
)
You need to do a nested IF:
IF(
[Speed] > 70 , [Speed] - 30,
IF(
[Speed] < 30 , [Speed] ,
[Speed] - 15
)
)
There is a SWITCH() function for simplifying nested IF functions. Unfortunately I donโt think it can check for equivalencies such as greater or less thans yet, so the above nested IF() is the best solution.
@Steve is this correct?
That worked!
Thanks
If it works, itโs correct!
You could also use IFS():
IFS(
([Speed] > 70),
([Speed] - 30),
([Speed] > 30),
([Speed] - 15),
TRUE,
[Speed]
)
It works but i am noticing if the speed is over 100 it get a little farther off. So how do i add:
If Speed is over 100 then = Speed - 40
nm. I followed your lead. Got it! Thanks
I want to display message based on Blood Sugar level but in the below expression few if conditions are not executing. please correct me if I am doing mistake
IFS(
([Blood Sugar] <= 130),
(โNormalโ),
([Blood Sugar] > 130),
(โLow Riskโ),
([Blood Sugar] > 175),
(โLevel 1โ),
([Blood Sugar] > 299),
(โLevel 2โ),
([Blood Sugar] > 400),
(โLevel 3โ),
TRUE,
[Blood Sugar]
)
Level 1 Level 2 Level 3 messages are not displaying
Try this:
IFS(
[Blood Sugar] > 400, "Level 3",
[Blood Sugar] > 299, "Level 2",
[Blood Sugar] > 175, "Level 1",
[Blood Sugar] > 130, "Low Risk",
TRUE,"Normal"
)
Thank you!
User | Count |
---|---|
39 | |
28 | |
23 | |
23 | |
13 |