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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
olimilo
Continued Contributor
Continued Contributor

Power Query returns 0 duplicates, but once loaded, dataset has duplicates?

I have a composite dataset that I trimmed down to unique values in PQ, nulls and blanks removed:

 

olimilo_1-1749786417971.png

 

Checking with Keep Duplicates, this dataset returns 0 duplicates. However, once I load the dataset, it returns 400+ duplicates:

 

olimilo_2-1749786499693.png

 

I am going to use this as a table that will bridge the source of the composite dataset but as it stand, I am unable to because it returns a M:M relationship towards both tables. Is there a way to guarantee that the composite dataset will return 0 duplicates once loaded?

1 ACCEPTED SOLUTION
v-hjannapu
Community Support
Community Support

Hi @olimilo,
Thank you  for reaching out to the Microsoft fabric community forum.
Thank you @Akash_Varuna , for your reply regarding the Query.

To over come from your issue Apply Trim, Clean, and Uppercase/Lowercase steps in Power Query before removing duplicates. This ensures your bridge table truly has unique values, and helps avoid the many-to-many issue in your data model.

I tested with my sample data, and its working fine please find the attached screenshot and pbix file for your reference.

vhjannapu_0-1749799317167.png

In my sample data, the company names appear the same, but they are linked to different regions and have different customer IDs  that’s why they show up multiple times.

If this answer was helpful and pointed you in the right direction, please consider accepting it as solution and kindly give a kudos it will benefit other community members in the community. If you have any further questions, feel free to let us know.

Regards,
Harshitha.
Community Support Team.

 

View solution in original post

5 REPLIES 5
v-hjannapu
Community Support
Community Support

Hi @olimilo,
Thank you  for reaching out to the Microsoft fabric community forum.
Thank you @Akash_Varuna , for your reply regarding the Query.

To over come from your issue Apply Trim, Clean, and Uppercase/Lowercase steps in Power Query before removing duplicates. This ensures your bridge table truly has unique values, and helps avoid the many-to-many issue in your data model.

I tested with my sample data, and its working fine please find the attached screenshot and pbix file for your reference.

vhjannapu_0-1749799317167.png

In my sample data, the company names appear the same, but they are linked to different regions and have different customer IDs  that’s why they show up multiple times.

If this answer was helpful and pointed you in the right direction, please consider accepting it as solution and kindly give a kudos it will benefit other community members in the community. If you have any further questions, feel free to let us know.

Regards,
Harshitha.
Community Support Team.

 

Hi @olimilo,

Just wanted to check if you had the opportunity to review the suggestion provided?

If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.

 

Thank You.

Hi @olimilo,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please Accept it as a solution so that other community members can find it easily.


Thank you.

Akash_Varuna
Community Champion
Community Champion

Hi @olimilo Power Query may process data differently than Power BI, causing duplicates to reappear after loading. Ensure columns like COMPANY_NAME are cleaned with Text.Trim, Text.Clean, and standardized for case using Text.Lower or Text.Upper. Check and set proper data types, then reapply Remove Duplicates as the final step in Power Query.

This is the case with Power Query. ABC is different from ABc so they're not considered duplicates but they're loaded into the model as either ABC or ABc, whichever the engine sees first which the model now sees as duplicates.

 

But instead of standardizing the same column, I would duplicate it and standardize it instead, apply remove duplicates to it then delete after as the users might not want to see everything in upper or lower case.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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