Forum Discussion

lherbert501's avatar
lherbert501
Post Prodigy
1 year ago
Solved

Count distinct duplicate entries across entity

Hi,   I need to count duplicate instances across email addresses and entity. E.g. if [email protected] is there 3 times across one of the two entities then this is 1. If it's got 1 entry on each e...
  • MohamedFowzan1's avatar
    1 year ago

    Hi lherbert501 

    Could you confirm if this is what you are looking for:
    DistinctEmailEntityCount =
    COUNTROWS(
    SUMMARIZE(
    TrialEntity,
    TrialEntity[Email],
    TrialEntity[Entity]
    )
    )

    I tried this out in sample data:
    Actual table I created:


    Visual and measure added to table:

     

    If you are just trying to count the duplicate:

    DuplicateEmailEntityCount =
    COUNTROWS(
        FILTER(
            SUMMARIZE(
                TrialEntity,
                TrialEntity[Email],
                TrialEntity[Enity],
                "CountRows", COUNTROWS(TrialEntity)
            ),
            [CountRows] > 1
        )
    )