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
Anonymous
Not applicable

Creating Objective Table from Many-to-Many analysis

Hello Power Bi Community,

 

I am currently facing a challenge in determining a solution for the analysis presented below. The table on the left illustrates my analysis data, while the table on the right represents the desired output that I aim to obtain.

 

Within the left table, I have two columns, namely 'ID' and 'Project,' which maintain a many-to-many relationship. My objective is to create formulas for the four columns in the right table (the displayed results have been manually computed). In essence, the 'Mapping Projects' column should initially search for all Project patterns that match with a minimum occurrence of three project patterns (for example, 'Project A & Project B' would not be included).

Subsequently, these matching project patterns should be appended to each row, separated by commas.

 

The second column, 'Mapping IDs,' should tally the distinct IDs that contain the matching project patterns. As for the 'Projects' and 'IDs Count' columns, they should simply count the number of Projects listed in the pattern and the number of mapping IDs respectively.

 

I would greatly appreciate your guidance on how to achieve the desired output in the right table by utilizing formulas in either Power Query or Excel.

 

jbend088_0-1693329975146.png

 

Thanks in advance for your support; your assistance is highly valued!

1 REPLY 1
lbendlin
Super User
Super User

Consider using a graphical solution.  Putting your data into a matrix yields

 

lbendlin_0-1693701912354.png

One project with four IDs, various combinations of projects with three ids (some matching, some not) and then the outliers with two or one IDs.

 

This may already be sufficient to answer your business question.

 

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.

Top Solution Authors