I'm wondering if it is possible to do a count for distinct values that meet a certain criteria on a list that has filters applied to it (only use visible).
I found an array formula to calculate distinct values:
Formula:
{=SUM(--(FREQUENCY(IF([criteria],MATCH([values],[values],0)),ROW(values)-ROW([valuesfirstcell])+1)>0))}
Real example:
Formula:
{=SUM(--(FREQUENCY(IF(Acumatica_Report!V:V=A2,MATCH(Acumatica_Report!B:B,Acumatica_Report!B:B,0)),ROW(Acumatica_Report!B:B)-ROW(Acumatica_Report!B2)+1)>0))}
I also found a different array formula that counts only visible cells in a list:
Formula:
=SUM(--(FREQUENCY(IF(SUBTOTAL(3, OFFSET(Table2[First Name], MATCH(ROW(Table2[First Name]), ROW(Table2[First Name]))-1, 0, 1)), COUNTIF(Table2[First Name], "<"&Table2[First Name]), ""), COUNTIF(Table2[First Name], "<"&Table2[First Name]))>0))
I'm looking for a way to combine these such that I get the functionality of the second formula with the [criteria] piece of the first formula. Anybody know if this is possible?
Example use case:
Use Case.png
Bookmarks