Forum Discussion
dataguy254
3 years agoNew Member
Returning original values in Power Query
Hello all, I recently ran into an issue that I was able to fix using some DAX language, but it is causing a lot of issues with load times. In the below table I have some sample data. The ID fiel...
slorin
3 years agoSuper User
Hi,
"the jobID which does not have a from value, meaning it is the original."
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Vcy7EcAwCAPQXVRTGHD8mcXn/dcIOORCGhVPJ60FBqGWYjlPCis2vc4hBLb2cwkhXD/XEELjnryGEA76vA+vevNqtsTygB3JSKwhfrFv", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, appID = _t, jobID = _t, from = _t]),
No_From_Value = Table.SelectRows(Source, each [from] = "" or [from] = null),
Join = Table.NestedJoin(Source, {"ID"}, No_From_Value, {"ID"}, "No_From_Value", JoinKind.LeftOuter),
Original = Table.ExpandTableColumn(Join, "No_From_Value", {"jobID"}, {"original"})
in
Original
Stéphane