Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have a CSV file with just over 13,000 rows. It is an export from a system and is stored in a SharePoint library from where Power BI imports it. The query looks like this:
let
Source = SharePoint.Files("https://sites.company.com/sites/sitename", [ApiVersion = 15]),
#"Filtered Rows" = Table.SelectRows(Source, each [Folder Path] = "https://sites.company.com/sites/sitename/foldername/subfoldername/"),
#"Filtered Rows1" = Table.SelectRows(#"Filtered Rows", each Text.StartsWith([Name], "FileName.csv")),
Navigation = #"Filtered Rows1"{[Name = "FileName.csv", #"Folder Path" = "https://sites.company.com/sites/sitename/foldername/subfoldername/"]}[Content],
#"Imported CSV" = Csv.Document(Navigation, [Delimiter = ",", QuoteStyle = QuoteStyle.Csv]),
#"Promoted headers" = Table.PromoteHeaders(#"Imported CSV", [PromoteAllScalars = true])
in
#"Promoted headers"The CSV file has no duplicate records (based on column [Instance ID] but when Power Query important it the rows are duplicated.
I've spent time googling this and duplicate rows from CSV imports seems to happen a lot not just in Powe Query but I've not found any solution or reason.
If I save just the header row and a single row in a new CSV file this does not happen. Note the issue happens both in Power Query Online (dataflow) and Power BI desktop (December 2023 release).
Does anybody have any ideas? Unfortunately I cannot share the CSV file.
@vgeldbr
Not sure how it happens without having a look at your query and debug. You can apply one more step to remove duplicates
Table.Distinct(#"Promoted headers", {"Instance ID"})
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.