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
grutkowskim
Regular Visitor

Relationship with multiple fields on two tables

2019-11-04_15-44-58.pngHello,

 

I'm fairly new to PowerBI and am trying to recreate a dashboard from Tableau to PowerBI. I have a budget spreadsheet with a Major Code, Date, and Budgeted sales. I also connect to our Margins data set that our actual sales flow through. In tableau, I'm able to create a relationship between both the date and major code to see performance on a monthly level. In PowerBI, I'm unable to create the two relationships. 

 

In the attached screenshot, I'd like to connect the Margins table to Projections Table using 

  • Transaction_Date = Date
  • MAJOR_CODE_DESC = Major Code Desc

Any suggestions on how to make this work?

1 ACCEPTED SOLUTION
v-joesh-msft
Solution Sage
Solution Sage

Hi @grutkowskim ,

As stated in the post below:

“Composite keys are not supported in Power BI. As you suspected, you would need to create a new column in each data source that contains the combined values, then use this as the relationship column.“

Cannot create multiples column relationship between two tables

Best Regards,

Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-joesh-msft
Solution Sage
Solution Sage

Hi @grutkowskim ,

As stated in the post below:

“Composite keys are not supported in Power BI. As you suspected, you would need to create a new column in each data source that contains the combined values, then use this as the relationship column.“

Cannot create multiples column relationship between two tables

Best Regards,

Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

create a concatenated column in both tables and join on that.

 

Refer https://docs.microsoft.com/en-us/dax/concatenate-function-dax

 

The information you have provided is not making the problem clear to me. Can you please explain with an example. If possible please share a sample pbix file after removing sensitive information.
Thanks

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.