A table of data that holds records of multiple projects. Projects may be duplicated within the table however, when they are, their Total Units are always the same number.
Obviously, a problem with this is that I cannot easily provide a sum or subtotal of the Total Units without double counting any duplicated project's Total Units within the Total Row. I am able to count only uniquely named projects, and outside the table, sum the total number of unique units. However I'm stuck at how I might be able to to filter by any other column within the table and have a Subtotaled sum of just the filtered (only visible) Total Units which still effectively provides a Sum which doesn't include duplicate Projects.
Data is in "Table1"
[Project] column is text
[Total Units] are numbers
I've used the following to remove duplicate named projects within the table's Total Row:
{=SUM(IF(FREQUENCY(IF(SUBTOTAL(3,OFFSET(D4,ROW([Project])-ROW(D4),,1)),IF([Project]<>"",MATCH("~"&[Project],[Project]&"",0))),ROW([Project])-ROW(D4)+1),1))}
and the following to effectively provide a sum of Total Units without any duplicate projects for all records in the table, in a cell outside of the table:
{=SUMPRODUCT(Table1[Total Units],IF(Table1[Project]="",0,1/COUNTIF(Table1[Project],Table1[Project])))}
Is there a way to combine these processes to provide a count when the data is filtered?
Or is the solution I seek down a different thought process?
I'm open to any solutions, thoughts, or suggestions.
Obviously, a problem with this is that I cannot easily provide a sum or subtotal of the Total Units without double counting any duplicated project's Total Units within the Total Row. I am able to count only uniquely named projects, and outside the table, sum the total number of unique units. However I'm stuck at how I might be able to to filter by any other column within the table and have a Subtotaled sum of just the filtered (only visible) Total Units which still effectively provides a Sum which doesn't include duplicate Projects.
Data is in "Table1"
[Project] column is text
[Total Units] are numbers
I've used the following to remove duplicate named projects within the table's Total Row:
{=SUM(IF(FREQUENCY(IF(SUBTOTAL(3,OFFSET(D4,ROW([Project])-ROW(D4),,1)),IF([Project]<>"",MATCH("~"&[Project],[Project]&"",0))),ROW([Project])-ROW(D4)+1),1))}
and the following to effectively provide a sum of Total Units without any duplicate projects for all records in the table, in a cell outside of the table:
{=SUMPRODUCT(Table1[Total Units],IF(Table1[Project]="",0,1/COUNTIF(Table1[Project],Table1[Project])))}
Is there a way to combine these processes to provide a count when the data is filtered?
Or is the solution I seek down a different thought process?
I'm open to any solutions, thoughts, or suggestions.