Subscribe Bookmark RSS Feed

Column that shows # of rows with each of the values in another column?

esoremada0

New Contributor

Joined:

Jun 3, 2016

I have a table of data where each row is a unit produced, and each unit has a failing pin which is denoted in a FAILING_PIN column. What I want is a column that summarizes the number of units with each failing pin number. So let's say I have 250 units that had pin 5 fail. Each of their FAILING_PIN column would say 5 and the column I want would say 250.

What I want can be done by using the tabulate or summarize options and then merging the result back to the original table, but I want the number to update as I filter the table. So if I select 50 of those 250 units and mark them as hidden, the column will update to 200 rather than just having the static number that I merged back. What is the best way to achieve this? The formula column feature seems to only operate on an individual row.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Here is a formula that works:

col number(If(excluded(rowstate(row()))==1,.,1),:failing pin)

Jim
3 REPLIES
ron_horne

Super User

Joined:

Jun 23, 2011

hi, esoremada0

take a look at this:

Re: Syntax: How do I create an index column by ID

the discussion also covers some robustness issues with that topic.

best,

ron

Solution

Here is a formula that works:

col number(If(excluded(rowstate(row()))==1,.,1),:failing pin)

Jim
esoremada0

New Contributor

Joined:

Jun 3, 2016

Thanks!