Forum Discussion

Simon_29's avatar
Simon_29
Helper II
4 years ago

Compare rows and add values ​​based on conditions

Hello,

I would like to ask how in Power Query to do that if I have the same numbers in "Badge" but a different column "M" to add the name of the metric from the column "Metric name".
In short, when "M" is "MR", take the metric from the "Metric name" column and add it to each record with the same "Badge Number". It's actually about comparing two lines in Power Query, and I don't know if I can do anything.

Can you help me ? I also attach a picture of what it should look like.

Thank you very much

1 Reply

  • HotChilli's avatar
    HotChilli
    Community Champion

    This is slightly confusing.  Does the Metric Name column exist already? If it does, what does the new column look like?

     

    Also, can you repost your data as a table (not a picture) please?