Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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:
| Institute | Cohort |
| Children's Hospital Boston | Children's Hospital Boston |
| Children's Hospital Boston | Dartmouth |
| Children's Hospital Boston | Georgetown University |
| Children's Hospital Boston | Carnegie Mellon |
| Dartmouth | Children's Hospital Boston |
| Dartmouth | Dartmouth |
| Dartmouth | Georgetown University |
| Dartmouth | Carnegie Mellon |
| Georgetown University | Children's Hospital Boston |
| Georgetown University | Dartmouth |
| Georgetown University | Georgetown University |
| Georgetown University | Carnegie Mellon |
| Carnegie Mellon | Children's Hospital Boston |
| Carnegie Mellon | Dartmouth |
| Carnegie Mellon | Georgetown University |
| Carnegie Mellon | Carnegie Mellon |
Basically mapping every insitute to every other insitute ( all possible permutations)
Thanks
Ekam
Solved! Go to Solution.
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]
)
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:
I hope i answered your question!
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:
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.
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:
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.
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:
I hope i answered your question!
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]
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.