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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
David_Billa
Frequent Visitor

Tables with no common columns

I have a scenario which was being asked in intwerview kindly help me --> 
Q.) there are two tables which doesn't have any columns in common how can we create relationships in this case(power bi). I thought we can use index for which interviewer is not happy.
What is the correct procedure in this case.

4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hi @David_Billa ,

 

You can't create the relationship for tables without common columns.

You could try to create a link table as a bridge between these tables if possible.

However you could still do some calculations even there's no relationship between these tables by using some DAX formula.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
AlexisOlson
Super User
Super User

For a relationship to be useful, there has to be something in common between the tables, even if there isn't an existing pair of columns that you can match up.

 

For example, if you have a date table that only has a single column Date and a fact table that has columns for Year and Month but no Date column, you can construct a representative Date column on the fact table like this

 

Date = DATE ( Table1[Year], Table1[Month], 1 )

 

and then use this column for the relationship with the date table.

 

There are lots of other ways your tables might have granularity mismatches or need a bit of extra work in order to create a relationship. However, if there aren't columns on both tables that have some sort of logical relationship, then there's no reason to create a relationship between the tables at all.

bcdobbs
Super User
Super User

Might be missing something but I think the answer is you can't.

 

Adding an index doesn't help because it doesn't create any shared description of the data.

 

Was there any details of what was in the two tables?



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Hi I have the same problem . I ll share the details. Please consider if u can help .

IMG_20220926_152011.jpg

IMG_20220926_151953.jpg

I want to show the budget and spends on campaigns.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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