Forum Discussion
DAX > M Query - LOOKUPVALUE
Hi Anonymous
I would value lbendlin's answer.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUQpKTU7MyQEyjCx0fRMrdY0MQGxLXceCIijbFCEORJGpxUqxOtFKTsh6LXW9SvMgSgwNEcoNzRHiMK2xAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Type = _t, #"Letter Date" = _t, #"Original Date" = _t, #"From Date" = _t, #"To Date" = _t, Flag = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", type text}, {"Type", type text}, {"Letter Date", type date}, {"Original Date", type date}, {"From Date", type date}, {"To Date", type text}, {"Flag", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", (x)=>Table.SelectRows(Original,
each [ID]=x[ID] and [Letter Date]=x[Original Date])),
#"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"To Date"}, {"Custom.To Date"})
in
#"Expanded Custom"
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
I've tried to apply the logic via a Custom Column but am getting a "Token Comma expected" error.
(x) => Table.SelectRows(#"FV-ToDt",
each [Employee ID] = x[[Employee ID]
and [To Date]=x[From Date]
)- v-juanli-msft6 years ago
Community Support
Hi Anonymous
(x) => Table.SelectRows(#"FV-ToDt",
each [Employee ID] = x[[Employee ID]
and [To Date]=x[From Date]
)[[ should be [.
Best Regards
Maggie
- Anonymous6 years agoNot applicable
Still getting an error. This time it's highlighted the end close bracket of the formula