Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Relating Data using a list of comma separated values

Hi,

I'm relatively new to Power Query and I'm just trying to get my head wrapped around a problem, so I'm looking for some general advice.

 

I have a table of 5k People. One of the columns is "Events", which is a string of comma-separated ID numbers, each number corresponding to a entry on the Event table.

 

The Event table has 40 Events with 3 columns: ID, Name, and Type. There are 4 event types.

 

I want to find out how many events of each type each person has been to.

 

So in general I need to break up a person's string of comma-separated event IDs, match each event ID to the Event table and find out what kind of event it was, and the keep a running tally of events of each type each person has been to.

 

Any thoughts on the best way to get this? I could resort to VB for this, but I'm trying to learn Power Query so I'm going to see if I can solve it this way if possible.

 

Thanks,
Dan

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Select the events column of your people table, select "Split Column by Delimiter", specify comma as the delimiter, and then under Advanced options select "Split into Rows" .

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

Select the events column of your people table, select "Split Column by Delimiter", specify comma as the delimiter, and then under Advanced options select "Split into Rows" .

Anonymous
Not applicable

Ah, OK, so from that I can make a join table, People-Events. From there I played around with merging tables and pivot columns and now have it giving me the desired results. I'm sure I can work on optimization because it takes quite some time to process, but this definitley was a nudge in the right direction. Thanks, @lbendlin !

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors