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.
Dear community,
I need a help merging two tables yet adding new values, as shown in the picture below
The Stock table should be left outer join. So the new tables should include all values from table Stock, respective Inbound for matched articles and new articles from table Inbound with respective values.
Would be grateful for any tips!
Solved! Go to Solution.
let
Stock = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTJSitWJVnKCs5whrFgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Article = _t, Stock = _t]),
Inbound = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTJUitWJVnKGs1zgLDcIKxYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Article = _t, Inbound = _t]),
#"Merged Queries" = Table.NestedJoin(Stock, "Article", Inbound, "Article", "In", JoinKind.FullOuter),
#"Expanded In" = Table.ExpandTableColumn(#"Merged Queries", "In", {"Article", "Inbound"}, {"Article.1", "Inbound"}),
#"Combined Columns" = Table.CombineColumns(#"Expanded In", {"Article.1", "Article"}, each if _{0} = _{1} then _{0} else _{0}??"" & _{1}??"", "Article")
in
#"Combined Columns"
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
thanks for help everyone!
let
Stock = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTJSitWJVnKCs5whrFgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Article = _t, Stock = _t]),
Inbound = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTJUitWJVnKGs1zgLDcIKxYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Article = _t, Inbound = _t]),
#"Merged Queries" = Table.NestedJoin(Stock, "Article", Inbound, "Article", "In", JoinKind.FullOuter),
#"Expanded In" = Table.ExpandTableColumn(#"Merged Queries", "In", {"Article", "Inbound"}, {"Article.1", "Inbound"}),
#"Combined Columns" = Table.CombineColumns(#"Expanded In", {"Article.1", "Article"}, each if _{0} = _{1} then _{0} else _{0}??"" & _{1}??"", "Article")
in
#"Combined Columns"
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
@Anonymous , Merge in Power Query. Append you can also explore
https://radacad.com/append-vs-merge-in-power-bi-and-power-query
Merge Tables (Power Query) : https://www.youtube.com/watch?v=zNrmbagO0Oo&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=16
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |