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! Request now

Reply
MCornish
Responsive Resident
Responsive Resident

Count duplicates

Hi

 

I have a requirement to be able to count the duplicates in a table.

 

Eg

 

PrimaryKeyField   

1

2

3

3

4

5

5

6

7

 

So in this example the duplicate value would be 2, as both values 3 and 5 have multiple entries. 

 

This only ever needs to be calculated over the whole table and will only ever be in a single card visual, so row context is not a concern.

 

Cheers

 

1 ACCEPTED SOLUTION
MCornish
Responsive Resident
Responsive Resident

Scratch that. As soon as I posted it I thought of the solution.

 

COUNTROWS( MyTable ) - DISTINCTCOUNT( PKColumn )

View solution in original post

1 REPLY 1
MCornish
Responsive Resident
Responsive Resident

Scratch that. As soon as I posted it I thought of the solution.

 

COUNTROWS( MyTable ) - DISTINCTCOUNT( PKColumn )

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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