Forum Discussion
joooffice
6 years agoHelper I
Copying value to another row based on another column
Hi I'm trying to find a way to copy the contents of the Outstanding column to any other row that has the same ID number. The ID's are not necessarily sequential or (and i dont want to change the ...
- 6 years ago
Hi, joooffice
let Source = Table.FromRecords(Json.Document(Binary.Decompress(Binary.FromText("i65W8nRRsjI0MtZR8kvMTVWyUvLKT1XSUfIvLSkuScxLycxLt1eyyivNyanVwVQbnJiLoVbJLTVVwaU0VQmmwcjAAq7BIzUnNQ+/8aZmcNVO+UmEjUd2j1tRagrRpvtmZhPwqYUlXLFzYlF+DhGOQTLfMS8Pv/nIAeNTmlxJtOKQ/DwcimMB",BinaryEncoding.Base64),Compression.Deflate))), fx = (tbl, id)=> Table.SelectRows(tbl, (r)=> (r[ID] = id) and (r[#"Outstanding?"] <> null)){0}?[#"Outstanding?"], result = Table.ReplaceValue(Source, each fx(Source, [ID]), each [#"Outstanding?"]=null, (x,y,z)=>if z then y else x, {"Outstanding?"}) in resultIf my code solves your problem, mark it as a solution
ziying
Mariusz
6 years agoCommunity Champion
Hi joooffice
Sure on the attached, you will find a solution, just follow the query steps.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
joooffice
6 years agoHelper I
Thanks Marius, I cant open the attchement though
Joanne