question

OsceolaDelgado-6635 avatar image
0 Votes"
OsceolaDelgado-6635 asked Lz-3068 commented

Power Query Column Replace Help

I want to replace 2 column in same step of power query . Let suppose I have 1-3 in one column and 2-3 is second column . with single step I want to multiply each value with 2 and replace it with new value

Thanks

power-query-not-supported
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Lz-3068 avatar image
0 Votes"
Lz-3068 answered Lz-3068 commented

Hi @OsceolaDelgado-6635

Assuming I understood, one way:

 let
 // Table for demo.
     Source = Table.FromColumns(
         { {1..5}, {6..10}, {"a".."e"} },
         type table [NumOne=number, NumTwo=number, Aplha=text]
     ),
 //
     ReplacedNum = List.Accumulate({"NumOne","NumTwo"}, Source,
         (state,current)=>
             Table.TransformColumns(state,
                 {current, each _ *2, type number}
             )
     )
 in
     ReplacedNum
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @OsceolaDelgado-6635
If by the greatest of chance the above proposal solved the issue would you mind accepting it as answer to help those who search before posting? Thanks & any question let me know

0 Votes 0 ·