Forum Discussion

nickvanmaele's avatar
nickvanmaele
Advocate II
3 years ago
Solved

Update rows in a table based on other rows in that same table

Hi,    I wanted to share a solution that I created for the following problem.  If anyone has a more elegant solution, feel free to comment.    Business problem description.  An IT environment i...
  • AlienSx's avatar
    3 years ago

    Hi, nickvanmaele 

     

    let
        Source = Excel.CurrentWorkbook(){[Name="tblInput"]}[Content],
        g = Table.Group(Source, {"Person"}, {{"rows", each _}, {"Approved?", (x) => List.Contains(x[Environment], "PROD")}}),
        expand = Table.ExpandTableColumn(g, "rows", {"Environment", "Role"})
    in
        expand