Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Pass and Fail Condition

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Created:
Apr 11, 2018 8:43 PM
| Last Modified: Apr 11, 2018 8:44 PM
(2851 views)

Hi Guys,

I have the following table and would like to know how shall I set the formula(or JSL) where in this case, based on ID and MAIN_RAD, I would like to check on the value of SUB_1 to SUB_3. The condition is if at least 2 of the SUB has a value of more than 20 then it will be considered as FAIL otherwise PASS.

For instance as you will notice, for M101X at MAIN_RAD 1, the SUB_3 is more than 20 but consider PASS as it did not fulfill the condition of at least 2 SUB more than 20 in spec limit.

Thank you.

ID | MAIN_RAD | SUB_1 | SUB_2 | SUB_3 | RESULT |

M101X | 1 | 10 | 15 | 29 | PASS |

M101X | 2 | 15 | 5 | 16 | PASS |

M102W | 1 | 25 | 18 | 30 | FAIL |

M102W | 2 | 8 | 14 | 11 | PASS |

M110A | 1 | 32 | 12 | 15 | PASS |

M110A | 2 | 51 | 45 | 30 | FAIL |

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Here is a formula that will do what you want

```
If( Sum( SUB_1 > 20, SUB_2 > 20, SUB_3 > 20 ) >= 2,
"Fail",
"Pass"
)
```

The Sum() function is documented in the Scripting Index

Help==>Scripting Index==>Functions==>Sum

The handling of Boolean logic is covered in the Scripting Guide

Help==>Books==>Scripting Guide

If you are going to to be using JSl, you need to take the time to read the Scripting Guide!

Jim

2 REPLIES 2

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Here is a formula that will do what you want

```
If( Sum( SUB_1 > 20, SUB_2 > 20, SUB_3 > 20 ) >= 2,
"Fail",
"Pass"
)
```

The Sum() function is documented in the Scripting Index

Help==>Scripting Index==>Functions==>Sum

The handling of Boolean logic is covered in the Scripting Guide

Help==>Books==>Scripting Guide

If you are going to to be using JSl, you need to take the time to read the Scripting Guide!

Jim

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Pass and Fail Condition

Thanks Jim !

Article Labels

There are no labels assigned to this post.