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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Direct Query Compare two Columns from different tables

Hey there,

 

I have the following Problem:

I have a PowerBI dataset imported via direct Query and habe some local excel tables imported via excel import.

Now i have to connect two columns form two tables:

Table 1: Imported via direct Query

starttimeOrder_LabelDowntime Reason
28.01.2022 16:1945812500Swap
28.01.2022 14:4245812500Swap
28.01.2022 12:0045812500Swap

 

Table 2: imported via excel

Date & TimeSmelteryCoilnumberTimeList
28.01.2022 16:3093430078965428.01.2022 16:18
28.01.2022 16:3093430078965428.01.2022 16:19
28.01.2022 14:5087454774521428.01.2022 14:42
28.01.2022 14:5087454774521428.01.2022 14:43
28.01.2022 11:4025412474823128.01.2022 12:00

 

Now i need to connect the Order_label to the smeltery Coilnumber and Date & Time

Therefor i added in PowerQuery a Colum TimeList, where every Value -30min to +30 min of the Date & Time Colum exists in 1 min steps.

 

Now i'm stuck how do i connect my two tables?

 

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Means both are imported then it is as good as import

In power query , you need to check

https://www.myonlinetraininghub.com/excel-power-query-vlookup

 

In Dax you can use Maxx, sumx

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

 

All these examples use one column, but in case of maxx, minx you can have more than one condition in filter

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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