Forum Discussion
Anonymous
9 months agoNot applicable
Replace all values with 0 in column
Morning - I am trying to achieve something that I was hoping would be quite simple in Power Query I have a large data set and reports already build up, but what I need to do is change $ Net value f...
- 9 months ago
Hello Anonymous
You can achieve the above scenario using M language in Power Query.Go to Power Query Editor → select your table.
Select the “$ Net” column.
- Go to the Formula Bar and replace the current step for $ Net with this custom logic as follows:
= Table.TransformColumns(
PreviousStepName,
{{"$ Net", each if [Company] = "A" then 0 else _, type number}}
)
Hope, I answered/resolved your query. Please give some kudos and mark this post as "Accepted Solution" if you find it useful.
ronrsnfld
Super User
9 months agoDid you test it? I could not get it to work. I did not think you could refer to a different column within Table.TransformColumns transform operation.
Anonymous
9 months agoNot applicable
Hi Anonymous ,
I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.
Thank you.