Forum Discussion
jitpbi
Post Patron
6 years agoCalculate status
Hi, I need help to get the status of a field based on few conditions. The below is the sample data where "New Stats" is the required field: Output1 Output2 Status New Status 100 150...
- 6 years ago
jitpbi Try this:
New Status = VAR FirstOutput = Table[Output1] VAR SecondOutput = Table[Output2] VAR CurrentStatus = Table[Status] VAR Result = IF ( OR ( AND ( FirstOutput < 5, SecondOutput > 100 ), AND ( FirstOutput = 0, SecondOutput = 0 ) ), "Error", CurrentStatus ) RETURN Result
amitchandak
Super User
6 years agojitpbi , You can create a new column like
New Status =
Switch(true(),
[Output1] < 5 && [Output2] >= 100 , "Error",
[Output1] =0 && [Output2] = 0 , "Error",
"Normal"
)