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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Gozde
Helper I
Helper I

Merge Query & Table with Duplications

Hello,

I need to merge one query and one table in Power BI. The table has duplications and I would like to keep them because of the logic. At below, you can find the simple example of what I am trying to do.

Capture.PNG

Unfortunately, I cannot use power query or merge function, because one of them is query. I need to do in Power BI / dax.  I tried crossjoin, union,lookup but none of them solve the issue. Can anyone help me?

 

Thank you!

Gozde

 

 

1 ACCEPTED SOLUTION

 

Lookup is not working for my case, because of dublications. I don't want to look up according to  engineer and location, because again dublication occurs. It can be that different engineer working in same location.

 

However, I found this solution:

 

I  changed the input table into this:

Solution.PNG

 

Afterwards, I look group 1 and 2 seperately via lookup function. It worked 🙂

 

Regards,

Gozde

View solution in original post

2 REPLIES 2
v-yuezhe-msft
Employee
Employee

@Gozde,

Create the following columns in Table-2.

Lookupengineer = LOOKUPVALUE('Query-1'[Engineer],'Query-1'[Date],'Table-2'[Date])
Lookuplocation = LOOKUPVALUE('Query-1'[Location],'Query-1'[Date],'Table-2'[Date])

1.JPG

Regards,
Lydia

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

 

Lookup is not working for my case, because of dublications. I don't want to look up according to  engineer and location, because again dublication occurs. It can be that different engineer working in same location.

 

However, I found this solution:

 

I  changed the input table into this:

Solution.PNG

 

Afterwards, I look group 1 and 2 seperately via lookup function. It worked 🙂

 

Regards,

Gozde

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.