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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.