Forum Discussion
Savino
2 years agoFrequent Visitor
= Table.NestedJoin
Hi all, I'm trying to write a formula to process the below list of files Query using Table.Nestedjoin Function (JoinKind.RightAnti). Table.Nestedjoin Function requires two tables: in my case the f...
- 2 years ago
It sounds like all your want to do is take the max week for each Order and then call it a closed service order on the max week.
Just Group By Order, Operation Max Week, Operation All Rows. Expand and add custom column Week = Max Week.
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTJUitWJVnKCs0BiRnAxI7iYMVwMwTIBs5yBLFM4y0wpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Order = _t, Week = _t]), #"Grouped Rows" = Table.Group(Source, {"Order"}, {{"Max Week", each List.Max([Week]), type nullable text}, {"Rows", each _, type table [Order=nullable text, Week=nullable text]}}), #"Removed Columns" = Table.RemoveColumns(#"Grouped Rows",{"Order"}), #"Expanded Rows" = Table.ExpandTableColumn(#"Removed Columns", "Rows", {"Order", "Week"}, {"Order", "Week"}), #"Added Custom" = Table.AddColumn(#"Expanded Rows", "Closed", each [Week] = [Max Week]) in #"Added Custom"Copy and paste entire code into blank query to see a full example.
wdx223_Daniel
Community Champion
2 years agoNewStep=List.Transform(List.Zip({List.RemoveLastN(PreivousStep[TransformFile]),List.Skip(PreivousStep[TransformFile])}),each Table.NestedJoin(_{0},ColumnList,_{1},ColumnList,"NewCol",JoinKind.RightAnti))
- Savino2 years agoFrequent Visitor
Hello Daniel, Thanks for your answer. Unfortunatly it didn't work. It is giving a new column with list item with error inside. See Below all details. Also I need a Table not a list.
Thanks again.