Forum Discussion

adbm's avatar
adbm
Icon for Helper I rankHelper I
2 years ago
Solved

Countifs to identify duplicates in dataset

Hi,   I have the purchase register of a company and I'm trying to identify and present duplicate entries in it using power bi. In excel i would've normally used the countifs function. Eg. if my tab...
  • Irwan's avatar
    2 years ago

    hello adbm 

     

    there are couple ways to do this depend on what/how you want to show those data.

    but in order to check duplicate, here are some ways. 

    1. using table visual. just drop your column value and this visual will automatically show one value per same value.

    2. use measure. as you can see, the duplicate value will be indicated by value over than 1.

    Duplicate = 
    var _Vendor = SELECTEDVALUE('Table'[Vendor ID.#])
    var _Dupl = CALCULATE(COUNT('Table'[Vendor ID.#]),ALLSELECTED('Table'),'Table'[Vendor ID.#]=_Vendor)
    Return
    _Dupl

    3. use calculated column. Similarly to measure above, but using calculated column (one with EARLIER() and another without EARLIER()).

     

    Hope this will help.

    Thank you.