Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Good morning,
I have a set of data , however, as you would expect when doing a full join, duplicate values are created for missing rows. The data is correct, but my question is, what is the best way to remove the duplicate values in eQty so that the totals align? Is there a good way to do this?
Thanks in advance
Hi @v-yingjl
Thanks for your response, however, this does not work. These are two seperate tables that are being joined, with a different order and rows. Creating new indices and merging on them does not work.
Below is what I'm using at the moment.
let
Source = Table.NestedJoin(MBOMLookup,
{
"Component",
"Component unit",
"Proj",
"MBOMData.EBOM"
},
EBOMLookup,
{
"Component",
"Component unit",
"Proj",
"EBOMData.Immediate Parent"
},
"EBOMLookup",
JoinKind.FullOuter
),
Hi @lklenner ,
One of the join kinds available in the Merge dialog box in Power Query is a full outer join, which brings in all the rows from both the left and right tables.
If want to get the expected output, need to add an index column in each table, and then use merge based on Component column and Index column.
Example:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCgq2cjYytrSwNDBQ0lFyNTAwNDfSNTI2NATyDI30gKKxOthUWRjpmlkaWKKrcrQ0MrIASiPMMjQwMzACKQOrigUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Component = _t, Id = _t, eQty = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Component", type text}, {"Id", type text}, {"eQty", Int64.Type}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type),
#"Merged Queries" = Table.NestedJoin(#"Added Index", {"Component", "Index"}, Table2, {"Component", "Index"}, "Table2", JoinKind.FullOuter),
#"Expanded Table2" = Table.ExpandTableColumn(#"Merged Queries", "Table2", {"Component", "Id", "eQty"}, {"Table2.Component", "Table2.Id", "Table2.eQty"}),
#"Removed Columns" = Table.RemoveColumns(#"Expanded Table2",{"Index"}),
#"Sorted Rows" = Table.Sort(#"Removed Columns",{{"Component", Order.Descending}, {"Table2.Component", Order.Descending}}),
#"Filled Down" = Table.FillDown(#"Sorted Rows",{"Component", "Table2.Component"})
in
#"Filled Down"
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
8 | |
8 | |
7 |
User | Count |
---|---|
17 | |
13 | |
7 | |
6 | |
6 |