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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
83dons
Helper III
Helper III

Identifying duplicates in one column

What is the simplest way of listing the duplicates in a single column? StaffID is unique but NInumber may not be hence we need to check for duplicates on it.

 

Table looks like

StaffID NInumber

0001   AS12345G

0002  AS12345G

0003  HY4353554M

0004  LI83243234C

0005 AW7345345N

 

Therefore the output would be:

StaffID NInumber

0001   AS12345G

0002  AS12345G

 

Thanks again for any help.

 

1 ACCEPTED SOLUTION

@83dons ,

No worries! If you’re not comfortable with DAX, you can do this easily in Power Query as well—no formulas needed.

Here’s how:

  1. In Power Query, select the NNumber column.
  2. Go to the “Group By” option in the toolbar.
  3. Group by NNumber, and add an “All Rows” operation (or count if you want to see how many duplicates).
  4. Filter the grouped table to keep only NNumbers with count 1.
  5. Expand to show the original StaffID and NNumber columns.

Step-by-step:

  • Home Transform Data (opens Power Query)
  • Select NNumber column Home tab Group By
  • Group by NNumber, use “Count Rows” as the new column
  • Filter the Count column for values greater than 1
  • Expand the new column to get your StaffID/NNumber pairs

This will give you exactly the output you need—no DAX required!
translation and formatting supported by AI

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @83dons,

Thanks for reaching out to the Microsoft fabric community forum.

It looks like you are trying to way to list all the duplicate values in a column. As @burakkaragoz and @johnt75 have already responded to your query, please go through their response and check if it solves your issue.

 

I would also take a moment to thank @burakkaragoz and @johnt75, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

 

If I misunderstand your needs or you still have problems on it, please feel free to let us know.  

Best Regards,
Hammad.
Community Support Team

 

If this post helps then please mark it as a solution, so that other members find it more quickly.

Thank you.

burakkaragoz
Community Champion
Community Champion

Hi @83dons ,

 

Easiest way is to use calculated column to flag duplicates, then filter. Here’s how you can do it in Power BI using DAX:

  1. Add new calculated column:
dax
 
IsDuplicate = CALCULATE(
    COUNTROWS('YourTable'),
    FILTER(
        'YourTable',
        'YourTable'[NNumber] = EARLIER('YourTable'[NNumber])
    )
) > 1
  1. Then, just filter your table (or visual) where [IsDuplicate] TRUE.
    This will show all rows where NNumber is duplicated, just like your output.

Let me know if you want solution in Power Query or SQL as well!

Hi @burakkaragoz I dont really use DAX is there a way to do this using the power BI ribbon at the top? Or can I just paste it into a transform step after the =

@83dons ,

No worries! If you’re not comfortable with DAX, you can do this easily in Power Query as well—no formulas needed.

Here’s how:

  1. In Power Query, select the NNumber column.
  2. Go to the “Group By” option in the toolbar.
  3. Group by NNumber, and add an “All Rows” operation (or count if you want to see how many duplicates).
  4. Filter the grouped table to keep only NNumbers with count 1.
  5. Expand to show the original StaffID and NNumber columns.

Step-by-step:

  • Home Transform Data (opens Power Query)
  • Select NNumber column Home tab Group By
  • Group by NNumber, use “Count Rows” as the new column
  • Filter the Count column for values greater than 1
  • Expand the new column to get your StaffID/NNumber pairs

This will give you exactly the output you need—no DAX required!
translation and formatting supported by AI

johnt75
Super User
Super User

Create a measure like

Num entries =
CALCULATE ( COUNTROWS ( 'Table' ), ALLEXCEPT ( 'Table', 'Table'[NI Number] ) )

Add this to a table or matrix visual with both the staff ID and NI Number columns and filter the results to only show when the value is greater than 1.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.