Emil_Yusifov's avatar
Emil_Yusifov
Regular Visitor
6 years ago
Status:
New

Replacing values in Power Query Editor

Hello.

 

In a column I have duplicating values.

I just want to replace a duplicated value only in one row.

Replacing values in Power Query Editor using context menu Replace Values menu item, causes all duplicates of replaced value replaced to new one in a current selected column.

 

What I should do to replace only value only in current row ? 

2 Comments

  • Hi, v-chuncz-msft.

    Thanks for reply.

     

    I modified and made it to work with my case, the formula described on that post. It works.

     

    Simple example. Suppose we have Red Apples of $10 and Green Apples of $20. Let change all apples that s price is $10:

    = Table.ReplaceValue(#"Changed Type", each [Price], each if [Price] = 10 and [Fruit]="Apple" then 20 else [Price], Replacer.ReplaceValue, {"Price"})

     

    It is a way of automation, and very useful in convenient cases.

    In other hand when click and change some cells case, it should be better to have a menu or direct rewrite opportunity of doing this.

     

    Best

    Emil