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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
esingh
Helper I
Helper I

Combining Table column with itself to get the desired table

Hi All,

I have a table with following input:

institution_name
Children's Hospital Boston
Dartmouth
Georgetown University
Carnegie Mellon

and want to have a new table with following outcomes:

InstituteCohort
Children's Hospital BostonChildren's Hospital Boston
Children's Hospital BostonDartmouth
Children's Hospital BostonGeorgetown University
Children's Hospital BostonCarnegie Mellon
DartmouthChildren's Hospital Boston
DartmouthDartmouth
DartmouthGeorgetown University
DartmouthCarnegie Mellon
Georgetown UniversityChildren's Hospital Boston
Georgetown UniversityDartmouth
Georgetown UniversityGeorgetown University
Georgetown UniversityCarnegie Mellon
Carnegie MellonChildren's Hospital Boston
Carnegie MellonDartmouth
Carnegie MellonGeorgetown University
Carnegie MellonCarnegie Mellon

Basically mapping every insitute to every other insitute ( all possible permutations)

 

Thanks

Ekam

3 ACCEPTED SOLUTIONS
FreemanZ
Super User
Super User

hi @esingh ,

 

try to create a calculated table like:

Table2 =

CROSSJOIN(

    VALUES(Table1[institution_name]),

    SELECTEDCOLUMNS(

        VALUES(Table1[institution_name]),

        "institution_name2",

        Table1[institution_name]

)

View solution in original post

Uzi2019
Super User
Super User

Hi @esingh 

 

You can add one more table with same column like below:

New Table=  values( Hospital[Institute name])

 

then add new table with cross join function:

Join Table= CROSSJOIN(VALUES(Hospital[Institute Name]),VALUES(New Table[Institute name]))
 
Then rename your 2nd column to cohort
 
Uzi2019_0-1729838093044.png

 

 

I hope i answered your question!

 

 

 
 





Don't forget to give thumbs up and accept this as a solution if it helped you!!!

View solution in original post

SamInogic
Super User
Super User

Hi,

 

As per our  understand you're trying to combine a table column with itself to create all possible pairings of institutions. Here's how you can achieve this in Power BI:

Steps:

In Power BI, go to the Data view and select the table that contains your institution_name.

Click on the Modeling tab and choose New Table.

Enter the following DAX expression to create a new table with all combinations:

Institute_Cohort =

CROSSJOIN(

    SELECTCOLUMNS(

        'institution_name',

        "Cohort", 'institution_name'[institute]

    ),

    SELECTCOLUMNS(

        'institution_name',

        "Institue", 'institution_name'[institute]

    )

)
Output:

SamInogic_0-1730116417973.jpeg

 

This will generate a new table called Institute_Cohort with two columns:

Institute: The institution name.

Cohort: All possible combinations with other institutions, including itself.

Now you have a table where every institution is mapped to all other institutions (including itself).

 

Hope this helps.

 

Thanks.

 

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/

View solution in original post

3 REPLIES 3
SamInogic
Super User
Super User

Hi,

 

As per our  understand you're trying to combine a table column with itself to create all possible pairings of institutions. Here's how you can achieve this in Power BI:

Steps:

In Power BI, go to the Data view and select the table that contains your institution_name.

Click on the Modeling tab and choose New Table.

Enter the following DAX expression to create a new table with all combinations:

Institute_Cohort =

CROSSJOIN(

    SELECTCOLUMNS(

        'institution_name',

        "Cohort", 'institution_name'[institute]

    ),

    SELECTCOLUMNS(

        'institution_name',

        "Institue", 'institution_name'[institute]

    )

)
Output:

SamInogic_0-1730116417973.jpeg

 

This will generate a new table called Institute_Cohort with two columns:

Institute: The institution name.

Cohort: All possible combinations with other institutions, including itself.

Now you have a table where every institution is mapped to all other institutions (including itself).

 

Hope this helps.

 

Thanks.

 

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/
Uzi2019
Super User
Super User

Hi @esingh 

 

You can add one more table with same column like below:

New Table=  values( Hospital[Institute name])

 

then add new table with cross join function:

Join Table= CROSSJOIN(VALUES(Hospital[Institute Name]),VALUES(New Table[Institute name]))
 
Then rename your 2nd column to cohort
 
Uzi2019_0-1729838093044.png

 

 

I hope i answered your question!

 

 

 
 





Don't forget to give thumbs up and accept this as a solution if it helped you!!!
FreemanZ
Super User
Super User

hi @esingh ,

 

try to create a calculated table like:

Table2 =

CROSSJOIN(

    VALUES(Table1[institution_name]),

    SELECTEDCOLUMNS(

        VALUES(Table1[institution_name]),

        "institution_name2",

        Table1[institution_name]

)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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