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

Relating keys in different tables

I have a new calendar date table that is associated with a transaction data table.

 

That transaction date table has a unique key for every date. These two tables have a relationship and work fine. 

 

What I need to connect to the transaction table or calendar table are unqiue vendor IDs that could be associated with each unique transaction date. 

 

 

If multiple vendors have transactions on a specific day, all of those vendors are not listed in the transaction table - only 1 day is.The transaction table works like this picture.

 Capture7.PNGAs you can see, 1 date no matter how many transactions from different vendors. 

 

The vendor table I need to connect to just has the list of names and IDs associated with each vendor, no transaction dates. 

 

What is the best way to solve this to make the vendor ID associated with the transaction ID?

 

 

The reason I am doing this is because I want to filter on vendor names, but right now of course it is not picking it up. I was thinking of creating a new table with these two connected.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I think I solved my issue for now. I created an entire separate table and added the columns I needed to it using

Summarize(table,table[column], table[column], on and on. 

 

Not sure if this is best practice, if it is not I would love to learn what's the better solution. 

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

So, do you have a fact table that contains the transaction date, vendor name and ID (or at least transaction date and unique vendor ID)? If you do, you should be able to get there using a RELATED or RELATEDTABLE, VALUES and CONCATENATEX.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I do have a fact table that just has the ID's of the transaction date and vendor. 

So again, separate transaction table, separate vendor id table, but those two id's are in a fact table together. 

The actual transaction date and vendor name are not in the fact tabele. 

 

How would you suggest using those functions you recommended? 

Anonymous
Not applicable

I think I solved my issue for now. I created an entire separate table and added the columns I needed to it using

Summarize(table,table[column], table[column], on and on. 

 

Not sure if this is best practice, if it is not I would love to learn what's the better solution. 

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.