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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Looking for same events in two fact tables and returning information

Hi, 

I'm struggling for some time on this problem. I have two fact tables with Event ID and Date. If the Event ID and Date from Table 2 are equal to those in Table 1, I can assume the event is the same so I need to extract the Location information from Table 2 to the same event in Table 1. If the event in Table 1 isn't in Table 2, Location information is left blank. 

 

Can you help me to develop a DAX function to this new column which solves my problem?

Example: 

 

Table 1:

Event IDDate
104/03
104/01
504/01
1204/01
1204/02

 

Table 2:

Event IDDateLocation
104/03A
104/02B
504/02A
1204/02C

 

Desired Table 1:

Event IDDateNew column - Location
104/03A
104/01 
504/01 
1204/01 
1204/02C

 

Thanks so much!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create a new column in table 1

New column - Location = maxx(filter('Table 2','Table 2'[Event ID] = 'Table 1'[Event ID] && 'Table 2'[Date]= 'Table 1'[Date]),'Table 2'[Location])
Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Create a new column in table 1

New column - Location = maxx(filter('Table 2','Table 2'[Event ID] = 'Table 1'[Event ID] && 'Table 2'[Date]= 'Table 1'[Date]),'Table 2'[Location])
Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.