Choose Language Hide Translation Bar

Community Trekker

Joined:

Mar 17, 2016

Counting a subset of column values

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:

Samplesubsetfailureyield
1a

yes

50%
1ano50%
1bno100%
2ayes100%
2ayes100%
2bno0%

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 3

Community Manager

Joined:

Jun 23, 2011

Re: Counting a subset of column values

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

Community Trekker

Joined:

Mar 17, 2016

Re: Counting a subset of column values

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.

Staff

Joined:

Jun 9, 2012

Re: Counting a subset of column values

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.)