Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Transformation to Multiply and Divide in the Same Step

  Guys, what is wrong with this script? = Table.TransformColumns(#"Expanded Table Column1", {{"Avg Talk", each _ *[Interactions]/ 86400, type number}})   What I aim to is to multiply column: Avg ...
  • xzmiche's avatar
    xzmiche
    5 years ago

    Table.TransformColumns can access only each column in isolation. We have to use below walk around method (this solution is from power-query-transform-a-column-based-on-another-column ðŸ˜ž 

     

     

    = Table.FromRecords(Table.TransformRows(#"Changed Type", (r)=> Record.TransformFields(r,{{"Avg Talk", each _ * r[Interactions]/86400}})))