Hi,
Is there an elegant formula way to count unique values or text based on multiple conditions. Countifs formula works but it does not count unique values, it counts all records based on # of records in the data set. Based on research I've seen some examples using arrays and sumproduct - it doesn't appear to be working...maybe I'm messing up on the syntax. Any help would be much appreciated! Thank you in advance!
Here is a sample data set:
[TABLE="width: 1000"]
<colgroup><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]City[/TD]
[TD]Segment Name[/TD]
[TD]Sub-Segment Name[/TD]
[TD]Transaction ID[/TD]
[TD]Country_Name[/TD]
[TD]Region[/TD]
[TD]C_Status[/TD]
[TD]Tier[/TD]
[TD]Bus_Segment[/TD]
[TD]Period[/TD]
[TD]Revenue[/TD]
[TD]Customer ID[/TD]
[/TR]
[TR]
[TD]Mexico City[/TD]
[TD]Technology[/TD]
[TD]Software[/TD]
[TD="align: right"]1234567[/TD]
[TD]Mexico[/TD]
[TD]LATAM[/TD]
[TD]No[/TD]
[TD]MME[/TD]
[TD]NA[/TD]
[TD]2018[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1234[/TD]
[/TR]
[TR]
[TD]Mexico City[/TD]
[TD]Technology[/TD]
[TD]Software[/TD]
[TD="align: right"]12345[/TD]
[TD]Mexico[/TD]
[TD]LATAM[/TD]
[TD]Yes[/TD]
[TD]MME[/TD]
[TD]NA[/TD]
[TD]2018[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1234[/TD]
[/TR]
[TR]
[TD]Mexico City[/TD]
[TD]Technology[/TD]
[TD]Software[/TD]
[TD="align: right"]24234[/TD]
[TD]Mexico[/TD]
[TD]LATAM[/TD]
[TD]No[/TD]
[TD]SME[/TD]
[TD]NA[/TD]
[TD]2018[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]345[/TD]
[/TR]
[TR]
[TD]Mexico City[/TD]
[TD]Technology[/TD]
[TD]Hardware
[/TD]
[TD="align: right"]3423423423[/TD]
[TD]Mexico[/TD]
[TD]LATAM[/TD]
[TD]No[/TD]
[TD]SME[/TD]
[TD]NA[/TD]
[TD]2018[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]345[/TD]
[/TR]
</tbody>[/TABLE]
I have named each of the above columns with name ranges for ease of reference. Below is the formula using countifs - it works but it gives me a count of number of records (in this case the lowest denominator is transaction ID), I want a formula which will give me a unique count of Customer_ID (e.g.Customer) based on a set of variables, with hopefully the ability to specify * for all in a particular parameter.
=COUNTIFS(Country,$P30,BusSegment,$C$7,Tier,$C$6,Period,AF$8,Region,$N30,SubRegion,$O30,Segment,$L30,SubSegment,$M30, C_Status,"*")
Is there an elegant formula way to count unique values or text based on multiple conditions. Countifs formula works but it does not count unique values, it counts all records based on # of records in the data set. Based on research I've seen some examples using arrays and sumproduct - it doesn't appear to be working...maybe I'm messing up on the syntax. Any help would be much appreciated! Thank you in advance!
Here is a sample data set:
[TABLE="width: 1000"]
<colgroup><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]City[/TD]
[TD]Segment Name[/TD]
[TD]Sub-Segment Name[/TD]
[TD]Transaction ID[/TD]
[TD]Country_Name[/TD]
[TD]Region[/TD]
[TD]C_Status[/TD]
[TD]Tier[/TD]
[TD]Bus_Segment[/TD]
[TD]Period[/TD]
[TD]Revenue[/TD]
[TD]Customer ID[/TD]
[/TR]
[TR]
[TD]Mexico City[/TD]
[TD]Technology[/TD]
[TD]Software[/TD]
[TD="align: right"]1234567[/TD]
[TD]Mexico[/TD]
[TD]LATAM[/TD]
[TD]No[/TD]
[TD]MME[/TD]
[TD]NA[/TD]
[TD]2018[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1234[/TD]
[/TR]
[TR]
[TD]Mexico City[/TD]
[TD]Technology[/TD]
[TD]Software[/TD]
[TD="align: right"]12345[/TD]
[TD]Mexico[/TD]
[TD]LATAM[/TD]
[TD]Yes[/TD]
[TD]MME[/TD]
[TD]NA[/TD]
[TD]2018[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1234[/TD]
[/TR]
[TR]
[TD]Mexico City[/TD]
[TD]Technology[/TD]
[TD]Software[/TD]
[TD="align: right"]24234[/TD]
[TD]Mexico[/TD]
[TD]LATAM[/TD]
[TD]No[/TD]
[TD]SME[/TD]
[TD]NA[/TD]
[TD]2018[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]345[/TD]
[/TR]
[TR]
[TD]Mexico City[/TD]
[TD]Technology[/TD]
[TD]Hardware
[/TD]
[TD="align: right"]3423423423[/TD]
[TD]Mexico[/TD]
[TD]LATAM[/TD]
[TD]No[/TD]
[TD]SME[/TD]
[TD]NA[/TD]
[TD]2018[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]345[/TD]
[/TR]
</tbody>[/TABLE]
I have named each of the above columns with name ranges for ease of reference. Below is the formula using countifs - it works but it gives me a count of number of records (in this case the lowest denominator is transaction ID), I want a formula which will give me a unique count of Customer_ID (e.g.Customer) based on a set of variables, with hopefully the ability to specify * for all in a particular parameter.
=COUNTIFS(Country,$P30,BusSegment,$C$7,Tier,$C$6,Period,AF$8,Region,$N30,SubRegion,$O30,Segment,$L30,SubSegment,$M30, C_Status,"*")