Hi there.
Long-time Excel user and dabbler in VBA who discovered Power Query for the first time today.
I've used this to combine values spanning multiple rows into single row entries with multi-value fields/cells. An example should be helpful:
Here's a mock-up of my source data.
Column A Column B
Beatles John
Beatles Paul
Beatles George
Beatles Ringo
Beatles John
Stones Mick
Stones Keith
Stones Charlie
Stones Ronnie
Stones Mick
Band name in Col A; Band Member in Col B. Note that we have duplicates, with "Beatles | John" and "Stones | Mick" appearing twice.
I've used Power Query to roll this stuff up nicely, with the result a single row per value in Column A. My current results looks like this:
Column A Column B
Beatles John;Paul;George;Ringo;John
Stones Mick;Keith;Charlie;Ronnie;Mick
Column B contains multi-value field/cells, with individual values separated by semicolons.
The issue is the duplicates. It's important to note that my duplicates are duplicate values within single, multi-value cells. So the question is how to use Power Query to clean those cells and remove any duplicative values in each individual cell. In this cae, the offending values are the duplicate John and Mick values.
My goal is to get to this result:
Column A Column B
Beatles John;Paul;George;Ringo
Stones Mick;Keith;Charlie;Ronnie
I figure there's got to be a way to do this right in Power Query, but my web searches haven't found anything touching upon this.
Any input welcome.
Thanks!
Long-time Excel user and dabbler in VBA who discovered Power Query for the first time today.
I've used this to combine values spanning multiple rows into single row entries with multi-value fields/cells. An example should be helpful:
Here's a mock-up of my source data.
Column A Column B
Beatles John
Beatles Paul
Beatles George
Beatles Ringo
Beatles John
Stones Mick
Stones Keith
Stones Charlie
Stones Ronnie
Stones Mick
Band name in Col A; Band Member in Col B. Note that we have duplicates, with "Beatles | John" and "Stones | Mick" appearing twice.
I've used Power Query to roll this stuff up nicely, with the result a single row per value in Column A. My current results looks like this:
Column A Column B
Beatles John;Paul;George;Ringo;John
Stones Mick;Keith;Charlie;Ronnie;Mick
Column B contains multi-value field/cells, with individual values separated by semicolons.
The issue is the duplicates. It's important to note that my duplicates are duplicate values within single, multi-value cells. So the question is how to use Power Query to clean those cells and remove any duplicative values in each individual cell. In this cae, the offending values are the duplicate John and Mick values.
My goal is to get to this result:
Column A Column B
Beatles John;Paul;George;Ringo
Stones Mick;Keith;Charlie;Ronnie
I figure there's got to be a way to do this right in Power Query, but my web searches haven't found anything touching upon this.
Any input welcome.
Thanks!