Forum Discussion

cottrera's avatar
cottrera
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

Count unique values if > 1

Hi 

 

I have a table that contains Property ref, Trad, Supplier and unique. The unique is a concatenation of Property-Trade-SupplierI have a report that filters by Suppplier. I am tryng to count the number of times the unique value appears if the count is greater that 1.  If the count equals to 1 I am not interested.

 

 

Table example

PropertyTradeSupplierUnique
1ELECACME1-ELEC-ACME
1ELECACME1-ELEC-ACME
1PLUMACME1-PLUM-ACME
2PLUMACME2-PLUM-ACME
3CARPACME3-CARP-ACME
4CARPACME4-CARP-ACME
4CARPACME4-CARP-ACME
4CARPACME4-CARP-ACME
4CARPACME4-CARP-ACME
4CARPACME4-CARP-ACME
5PLUMACME5-PLUM-ACME
5PLUMACME5-PLUM-ACME
6ELECABC6-ELEC-ABC
7ELECACME7-ELEC-ACME
7ELECACME7-ELEC-ACME
7PLUMABC7-PLUM-ABC
8PLUMABC8-PLUM-ABC

 

This sumarry of the above table shows you that the supplier called ACME had 4 incidences where the count of the unique column was > 1

 

Supplier & uniqueCount of Unique
ABC3
6-ELEC-ABC1
7-PLUM-ABC1
8-PLUM-ABC1
ACME14
1-ELEC-ACME2
1-PLUM-ACME1
2-PLUM-ACME1
3-CARP-ACME1
4-CARP-ACME5
5-PLUM-ACME2
7-ELEC-ACME2


Thank you Richard

  • Hi,

    Please check the below picture and the attached pbix file.

     

     

    Countrows meausre greater than one: =
    COUNTROWS (
        SUMMARIZE ( FILTER ( Data, [Countrows measure:] > 1 ), Data[Unique] )
    )
    

2 Replies

  • Hi,

    Please check the below picture and the attached pbix file.

     

     

    Countrows meausre greater than one: =
    COUNTROWS (
        SUMMARIZE ( FILTER ( Data, [Countrows measure:] > 1 ), Data[Unique] )
    )