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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
bdusen
New Member

Look Up Comma Delimited Values in a Cell

Hi all,

 

I've read dozens of other responses across these and other forums and I'm trying to figure out the best solution. I'm building reporting views off of massive data extract files that are produced nightly by one of our systems. Any field that references a user who fills a specific role uses an alphanumeric user ID instead of a name. There is a Contacts table that cross references the user ID with the name.

 

It's easy enough to create a relationship between tables to link the user ID with the name. Where I'm running into trouble is scenarios where there are multiple users in a role. For these instances the system extracts return the user IDs as a single comma delimited string.

 

I've tried splitting these into separate rows in Power Query but I'm running into issues merging the full names back to a single value using CONCATENATEX.

 

Here's an example of the data. We'll call this table "Reviewer"

Item IDReviewer
RR-12345ABC1234
RR-23456DCB3456
RR-78945CCB8912
RR-36985AAB7890
RR-74125DCB3456
RR-98765ABC1234,DCB3456,CCB8912
RR-25478DCB3456
RR-36789CCA4567
RR-23589DDB5678,AAB7890
RR-11124DDB5678,ABC1234
RR-22436CBD2345

 

And here's the table linking the user ID with name, called Contacts: 

User IDName
ABC1234Smith, John
CBD2345Peterson, Michelle
DCB3456Holland, Jessica
CCA4567McEntee, Donna
DDB5678Lopez, Mike
AAB7890Dawson, Alan
CCB8912Scott, Maxwell

 

This is what my desired output would be:

Item IDReviewer
RR-12345Smith, John
RR-23456Holland, Jessica
RR-78945Scott, Maxwell
RR-36985Dawson, Alan
RR-74125Holland, Jessica
RR-98765Smith, John ; Holland, Jessica ; Scott, Maxwell
RR-25478Holland, Jessica
RR-36789McEntee, Donna
RR-23589Lopez, Mike ; Dawson, Alan
RR-11124Lopez, Mike ; Smith, John
RR-22436Peterson, Michelle
1 ACCEPTED SOLUTION
SamWiseOwl
Super User
Super User

Do you want the output to be a calculated column or a measure?

Also have you tried Fuzzy Merge in the Query editor?

SamWiseOwl_0-1727359676662.pngSamWiseOwl_1-1727359719070.png

 

Assuming you split the Reviewer onto seperate rows then joined to the userid:

SamWiseOwl_0-1727359975175.png

 

Cross filter lets the Many side of the join filter the 1 side.

So for each Item show the matching users.

 

For the same outcome but using a calculated column without unpivoting:

SamWiseOwl_0-1727360323213.png

Apply a filter to the contacts table and test if the current row is within the current reviewer column.


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

View solution in original post

3 REPLIES 3
nandic
Super User
Super User

Hi @bdusen ,
Attached demo file based on your demo data.
Steps:
1) table Reviews, split user id column and then unpivot to get 2 columns: item id, user id
2) create relationship between Reviews and Contacts. Contacts will have 1 value of User Id, Reviews will have multiple
3) create additional column in dax in Reviews table: 

User Name = RELATED(Contacts[Name])
4) finally, create new table based on dax expression: 
Summarized data =
SUMMARIZE(Reviewer,Reviewer[Item ID],"Users",CONCATENATEX(VALUES(Reviewer[User Name]),Reviewer[User Name],"; "))

Yes, it is new table, but at least for start with something 🙂

nandic_0-1727361075543.png


Cheers,
Nemanja

SamWiseOwl
Super User
Super User

Do you want the output to be a calculated column or a measure?

Also have you tried Fuzzy Merge in the Query editor?

SamWiseOwl_0-1727359676662.pngSamWiseOwl_1-1727359719070.png

 

Assuming you split the Reviewer onto seperate rows then joined to the userid:

SamWiseOwl_0-1727359975175.png

 

Cross filter lets the Many side of the join filter the 1 side.

So for each Item show the matching users.

 

For the same outcome but using a calculated column without unpivoting:

SamWiseOwl_0-1727360323213.png

Apply a filter to the contacts table and test if the current row is within the current reviewer column.


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

The calculated column in the second part is EXACTLY what I was looking for. There might be several columns on a given table that have delimited user IDs so being able to do this on a per column basis without unpivoting is insanely helpful. THANK YOU!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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