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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.