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.
Hey guys,
I'm facing a really akward problem. I imported data into Power BI and identified that there are duplicates.
I tried removing them. It works in Power Query Editor and I don't see any duplicates there. However, in my report I still see some duplicates. I compared the rows which contain duplicates and there are no hidden signs or special characters except from '-', '_', or ' '. No matter there are these signs, removing duplicates also works for other rows, which contain the same signs.
Some Reference Data where Power BI has Problems with:
Basic Talk
2022_KW48_DE_1122_Play_Live Event_ABC TBD
... and where Power BI does not have any problems with:
1236_TEST_CHINA
2&1 Datadriven @ Campaign Session
I tried the following methods (as also suggested here) to get rid of the duplicates and identify the issue why I still have them in the report, but none of them worked to remove the duplicates and don't switch everything to upper- or lowercase:
If I do a DistinctCount on the column containing the duplicates every row returns 1. Using a regular Count still shows there are duplicates. Also, removing the duplicates in an EXCEL-file or through a SELECT DISTINCT in SQL works without any problems.
Did anyone already face the same issue and can help me on how to fix this?
Hi,
Share some data to work with and clearly show the problem there.
Hi @iceparrot
From your message,does it mean that you have duplicate fields in your table, but they are either uppercase and some are lowercase.
If it is the situation above, you can try to the following code in "Advanced Editor" in power query as an example:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WckoszkxWCEnMyVaK1YlWMjIwMor3DjexiHdxjTc0BHICchIr430yy1IVXMtS80riHZ2cFUKcXEhQXZKUAladBLaqBGxVLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each [Column1]),
#"Uppercased Text" = Table.TransformColumns(#"Added Custom",{{"Column1", Text.Upper, type text}}),
#"Removed Duplicates1" = Table.Distinct(#"Uppercased Text", {"Column1"}),
#"Removed Columns" = Table.RemoveColumns(#"Removed Duplicates1",{"Column1"})
in
#"Removed Columns"
If the information above cannot meet your requirement, can you provide some sample data or pbix file?
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
76 | |
62 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |