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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
mattsampson
Helper I
Helper I

Identifying duplicate entries in a column, shown in a report table

Hi Guys,

 

I've got a report with a table of student data that has come in via a form.

Some students have been annoying and submitted the form twice and I need to be able to see this within the PowerBI report rather than pull this into excel and do a conditional format on that column. 

I want to highlight using a background colour ideally, the rows (or at least the UserID field) for the duplicates. 

 

NameYearOption1Option2UserID
JoeYear 10MathsSciencejoe123
JoeYear 10MathsEnglishjoe123
PeterYear 7MusicArtpeter123
PeterYear 7MusicArtpeter123
MattYear 8FrenchEnglishmatt123
JohnYear 8MusicArtjohn123
RachelYear 9MathsEnglishrachel123
EmilyYear 10EnglishScienceemily123

 

Thanks in advance

Matt 

 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

You can use an expression like this to give you the count of entries with the same userid (and then you can sort/filter by it to find multiples).  I called the table Students, so replace that with your actual table name.

 

Count Same ID =
CALCULATE (
COUNT ( Students[UserID] ),
ALL ( Students ),
Students[UserID] = EARLIER ( Students[UserID] )
)
 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

You can use an expression like this to give you the count of entries with the same userid (and then you can sort/filter by it to find multiples).  I called the table Students, so replace that with your actual table name.

 

Count Same ID =
CALCULATE (
COUNT ( Students[UserID] ),
ALL ( Students ),
Students[UserID] = EARLIER ( Students[UserID] )
)
 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


jthomson
Solution Sage
Solution Sage

Should be possible using a countrows formula in a conditional column using the id field as a basis, you can then conditionally format/sort on that new column

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors