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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
bradc
Frequent Visitor

Relating a multiple entry column with single entry column

Hi All,

I have a column relationship question between tables.  I basically have 2 tables.  Table (1) containers data with a field containing multiple codes.

bradc_0-1732574112287.png

Table (2) contains the individual codes and their descriptions

bradc_1-1732574175325.png

Can anyone assist with a method of relating the 2 tables so that I can produce a graph of the codes, counting the number of entries in Table (1)?

 

All help much appreciated

B

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

@bradc 

 

Download PBIX file with the example shown below

 

You need to split the Codes column in the first table into separate rows for each code.  Do this by splitting the column by delimiter (space) in Power Query, choosing to create rows rather than the default columns

 

You can then have a 1 to many relationship between table2 and table1 on the Code field, this will allow you to associate the codes in Table1 with the descriptions in Table2 - but that isn't required if you just want to count entries from table1?

 

PhilipTreacy_0-1732577755721.png

 

PhilipTreacy_2-1732577803420.png

 

PhilipTreacy_3-1732577855189.png

 

PhilipTreacy_4-1732577879093.png

 

PhilipTreacy_5-1732577896888.png

 

PhilipTreacy_6-1732577995316.png

 

If this isn't what you are after, please show an example of the desired result.

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

3 REPLIES 3
sevenhills
Super User
Super User

https://www.youtube.com/watch?v=Lb73w8ZjZTw


Optional: 

If you want to keep the data in original table as is, then in such case duplicate the table.

 

This video explains a split column into multiple rows. And, once you have the data ready for table 1, join to table 2 i.e., start building the relationships. Later do your DAX and visualizations per your needs.

 

Thanks

PhilipTreacy
Super User
Super User

@bradc 

 

Download PBIX file with the example shown below

 

You need to split the Codes column in the first table into separate rows for each code.  Do this by splitting the column by delimiter (space) in Power Query, choosing to create rows rather than the default columns

 

You can then have a 1 to many relationship between table2 and table1 on the Code field, this will allow you to associate the codes in Table1 with the descriptions in Table2 - but that isn't required if you just want to count entries from table1?

 

PhilipTreacy_0-1732577755721.png

 

PhilipTreacy_2-1732577803420.png

 

PhilipTreacy_3-1732577855189.png

 

PhilipTreacy_4-1732577879093.png

 

PhilipTreacy_5-1732577896888.png

 

PhilipTreacy_6-1732577995316.png

 

If this isn't what you are after, please show an example of the desired result.

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Wow!  Thank you.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.