Forum Discussion

wolfy_'s avatar
wolfy_
Helper I
7 years ago
Solved

Find duplicate values diferent projects

Hi,

 

It is possible to have a measure that find me duplicate values for project IDs in the same location?

 

For example, there is project ID 1 for the same location Lisbon.
The same happens with Porto location that have the project ID 17 duplicated.

 

LocationProject IDReturn
Lisbon1500
Porto17650
Santarem1780
Lisbon2250
Santarem2589
Faro1785
Lisbon1658
Aveiro1500
Porto2200
Porto3300
Porto17258

 

Thanks in avance

  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi wolfy_,

     

    In my opinion, you can calculate count and distinct count of specific project id from same location. Then calculate the diff between them, It should be the duplicate id count.

    Measure =
    CALCULATE (
        COUNT ( Table[Project ID] ) - DISTINCTCOUNT ( Table[Project ID] ),
        ALLSELECTED ( Table ),
        VALUES ( Table[Location] )
    )
    

     

    Regards,

    Xiaoxin Sheng

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi wolfy_,

     

    In my opinion, you can calculate count and distinct count of specific project id from same location. Then calculate the diff between them, It should be the duplicate id count.

    Measure =
    CALCULATE (
        COUNT ( Table[Project ID] ) - DISTINCTCOUNT ( Table[Project ID] ),
        ALLSELECTED ( Table ),
        VALUES ( Table[Location] )
    )
    

     

    Regards,

    Xiaoxin Sheng

  • Hi,

     

    You can drag Location and Project ID to the row labels and write this measure

     

    =COUNTROWS(Data)

     

    Hope this helps.