Forum Discussion

jitpbi's avatar
jitpbi
Icon for Post Patron rankPost Patron
6 years ago
Solved

Calculate 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...
  • AntrikshSharma's avatar
    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