Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

m query to replace values with conditions

Hi,
I have following table:
IDset name3 value2

112 mass 3

112 other something

113 mass 4

113 other something

 

 

I want to add another column called end result.
I want end result value to be  if [NAME3] = mass and [VALUE2] =3 all rows with same IDset are set to same as [VALUE3], that is 3 in this example.

 

IDset name3 value2 end result

112 mass 3 3

112 other something 3

113 mass 4 4

113 other something 4

 

How I do this? I tried with replace values command, but I cannot figure how to get IDset in in play.

I want to use power query, preferably m-query.