Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
pstp
Frequent Visitor

Count of Duplicates with Another Parameter

I have a table with ID's that signify people. There is another boolean column. I need a count of ID's that are duplicated in the table AND one of the rows with that ID has a TRUE value in the boolean column. Any suggestions on how to accomplish this?

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

I think this might work:

Dupes =
VAR Summary =
    SUMMARIZE (
        Table1,
        Table1[ID],
        "@Count", COUNT ( Table1[ID] ),
        "@Bool", TRUE IN VALUES ( Table1[Boolean] )
    )
RETURN
    COUNTROWS ( FILTER ( Summary, [@Count] > 1 && [@Bool] ) )

 

View solution in original post

3 REPLIES 3
RanjeetK
Helper I
Helper I

Hi @AlexisOlson 
what if that boolean Column is from another table ?????
i have try this but above solution is does not work 
it gives following error - 

RanjeetK_0-1667276048447.png

anyone knows about this please help..................

Here is my Measure - Like Project is Table1 and Project Standard Accreditation is Table 2 

PQ count with virtual table 2 =
Var TableA =
SUMMARIZECOLUMNS (
Project[project ID],
'Project Standard Accreditation'[Project Std Acr Accreditation Id ],
'Project Standard Accreditation'[Project Std Acr Standard Id],
"Count Of Duplicates",
CALCULATE (
COUNT ( 'Project Standard Accreditation'[BK_NGPSBI_PROJECT_STANDARD_ACCREDITATION] ),
KEEPFILTERS ( 'Project Standard Accreditation'[Project Std Acr Active] = "Yes" ))
)
Var GreaterThan = FILTER(TableA,[Count Of Duplicates] >=2)
Var _Result = COUNTROWS(GreaterThan)
Return
_Result

AlexisOlson
Super User
Super User

I think this might work:

Dupes =
VAR Summary =
    SUMMARIZE (
        Table1,
        Table1[ID],
        "@Count", COUNT ( Table1[ID] ),
        "@Bool", TRUE IN VALUES ( Table1[Boolean] )
    )
RETURN
    COUNTROWS ( FILTER ( Summary, [@Count] > 1 && [@Bool] ) )

 

This is excellent, thank you!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors