I trying to get the MAX date from a table onto a different date with power query. At the moment I'm stuck and all I get is a table based on a condition. Not sure if this is clear, so I'll explain with the code. This is my code at the moment:
let
Source = Table.NestedJoin(Table.NestedJoin(SKU,{"SKU"},q_UltColh_NEW,{"SKU"},"qUltColh_NEW",JoinKind.LeftOuter),{"SKU"},r_STK,{"SKU"},"Rep_Stk", JoinKind.LeftOuter),
.
.
.
#"Expanded Origem" = ...
#"Expanded Origem" = Table.ExpandTableColumn(#"Merged Queries", "Origem", {"Desc_ORI", "Parent_ORI"}, {"Origem.Desc_ORI", "Origem.Parent_ORI"}),
#"Added Last_Rec" = Table.AddColumn(#"Expanded Origem", "Last_Rec", each
let SKU = [SKU]
in Table.SelectRows(r_GOODSREC,each [SKU]=SKU)
)
in
#"Added Last_Rec"
I have two tables:
SKU Desc
46_24_ ABC
103_5_ DEF
doc_DATE RowNo SKU Cod_ART QTT
10/01/2017 1 46_24_ 46.24 50
14/01/2017 1 46_24_ 46.24 100
14/01/2017 1 103_5_ 103.5 50
16/01/2017 1 103_5_ 103.5 100
And I want to get:
SKU Desc Last_Entry Qtt
46_24_ ABC 14/01/2017 50
103_5_ DEF 16/01/2017 100
my code is returning a table with various columns:
SKU Desc Last_Entry
46_24_ ABC Table
103_5_ DEF Table
I believe once I get the max value I can just exapand the table, unless you tell me that is a bad ideia.
Thank you very much,

