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
- :
- Discussions
- :
- Counting a subset of column values

Topic Options

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

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

Aug 22, 2016 12:57 PM
(1482 views)

I'm trying to count a subset of values using another column as the marker. For any number of samples that have multiple subsets, how can I count the states of those subsets?

For example:

Sample | subset | failure | yield |
---|---|---|---|

1 | a | yes | 50% |

1 | a | no | 50% |

1 | b | no | 100% |

2 | a | yes | 100% |

2 | a | yes | 100% |

2 | b | no | 0% |

Samples have subsets "a" and "b", that fail or pass. I'm trying to find the yield of those subsets. I'm sure there's some combination of lag, diff, col number, that I can use but I can't get it. Any help or functions that I could possibly use would be greatly appreciated.

Thanks

3 REPLIES

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

Is there some reason you need this in a column in the original data table?

You can get this from Tabulate. Here I'm using the Row % statistic to compute the value you're looking for. I saved the script to the data table made from your table above and attached it here so you can see how it's done.

-Jeff

-Jeff

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

Aug 22, 2016 2:26 PM
(1376 views)
| Posted in reply to message from Jeff_Perkinson 08/22/2016 05:05 PM

I'm making a quick and dirty reporting window with a column switcher and it'd be nice to have yield v time on it.

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

Kyle, you can use this cumbersome column formula, assuming the yield in line 3 of your example was meant to be 0, (otherwise, the results in rows 3 and 6 of your example seem at odds.)