Forum Discussion
Require assistance for comparing multiple columns
TheNicholas27, like this?
Result
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("dY4xD4IwEIX/StO5S8FWGBF10sSdMBzQ2CbYmqMh+O+9djAx0dvu3vfeu67jioYL3uBo3QDzJFgzmw38ZJDOR7caXOjmow3+xXtBjnInSToAEtxadEsMT5vxc0gBV8Axk3tVJLK18BhyzMUE/68sGbQsyh+tgrMsV7LWtJy2iLDCHXwU7Gai+QB1pdX3G1np3w==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Student district ID" = _t, #"Student Names" = _t, #"Student names having taken the test" = _t]),
MergedQueries = Table.NestedJoin(Source, {"Student names having taken the test"}, Source, {"Student Names"}, "Source", JoinKind.LeftOuter),
ExpandedSource = Table.ExpandTableColumn(MergedQueries, "Source", {"Student district ID"}, {"SStudent districct IDs having taken the test"})
in
ExpandedSourceYes although im not quite sure how to enter the code.
Sincerely,
- dufoq32 years ago
Community Champion
Have you read note below my post? BTW. It is power query solution.
- ManuelBolz2 years ago
Responsive Resident
Hello
If my post helped you, please give me a 👍kudos and mark this post with Accept as Solution.
You can replace the highlighted area from my screenshot with your source or last step.
Best regards from Germany
Manuel Bolz
🟦Follow me on LinkedIn
🟨How to Get Your Question Answered Quickly
🟩Fabric Community Conference
🟪My Solutions on Github- TheNicholas272 years agoNew Member
Im trying but it gives me the error on the column name, even if i change the column name.
Im sorry, im no programmer therefore i don't understand where im going wrong.let
Type = Table.TransformColumnTypes(Source,{{"Student district ID", Int64.Type}, {"Student Names", type text}, {"Student names having taken the test", type text}}),
Students = Type[[StudentNumber],[StudentName]],
Merge = Table.NestedJoin(Type, {"Student names having taken the test"}, Students, {"Student Names"}, "Test", JoinKind.LeftOuter),
Expand = Table.ExpandTableColumn(Merge, "Test", {"Student district ID"}, {"Student names having taken the test"})
in
Expand- ManuelBolz2 years ago
Responsive Resident
Hello TheNicholas27
okay, step by step...
Somewhere in Power Query you loaded the table that you showed as an example in your second post.Please share this M-Code with us so that we can add the correct solution.
If my post helped you, please give me a 👍kudos and mark this post with Accept as Solution.
Best regards from Germany
Manuel Bolz
🟦Follow me on LinkedIn
🟨How to Get Your Question Answered Quickly
🟩Fabric Community Conference
🟪My Solutions on Github