Formula Problem
if Schedule_V < 1 then
styled(" UNDER PLANNED COST ", "white", "warn")
else
if Schedule_V > 0 then
styled(" OVER PLANNED COST ", "white", "ok")
else
if Schedule_V = Plan_V then
styled(" GOOD ", "white", "ok")
end
end
end
This Formula don't giving me the result I want
The third if don't give me nothing
7 replies
-
Hi Rafael,
it would help to know what values Schedule_V can have. But anyway, I think the numbers for comparison are not correct:
- The first "if" matches for Schedule_V smaller than 1 - that's maybe ok
- The second "if" matches for Schedule_V larger than 0 - that's not ok, because all values between 1 and 0 are already covered by the first "if"
- And then, the third ... as I said: What value can Schedule_V have? Can you even reach the "else"-part?
-
Lars
I send a File is small module working to ad to my Master BD. (Working on Earned Value Management)
The Problem is on EVM Table (KPI'sActivities)
-
Building on Lars' comments, you can never get to the 2nd else because the first two ifs cover all possibilities.
The first IF covers everything below 1 and the second IF covers everything above 0. So there is nothing that falls outside of those two scenarios.
-
Once you have checked for =0 or >0 then all that's left is <0 so you can simplify this code to
if Schedule_V > 0 then styled(" AHEAD OF SCHEDULE ", "white", "ok") else if Schedule_V = 0 then styled(" ON SCHEDULE ", "white", "ok") else styled(" BEHIND SCHEDULE ", "white", "warn") end end
Regards John
-
John Halls
Excelent John Thanks
Content aside
- Status Answered
- 2 yrs agoLast active
- 7Replies
- 49Views
-
4
Following