Forum Discussion

bvanevr's avatar
bvanevr
Advocate II
8 years ago
Solved

Count duplicates with having constraint

I am working with data quality visualization and trying to count for duplicates with a filter and not seeing how to accomplish.  Below is some made up data that should help explain issue:   Bran...
  • Zubair_Muhammad's avatar
    8 years ago

    bvanevr

     

    Try This Calculated Column

     

    Duplicates =
    VAR mycount =
        CALCULATE (
            DISTINCTCOUNT ( TableName[surrogate] ),
            ALLEXCEPT ( TableName, TableName[Parent] )
        )
    RETURN
        IF ( TableName[Brand] = "ST", IF ( mycount = 1, "Pass", "Failure" ), "N/A" )