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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
siva3012
Helper II
Helper II

I need to Merge two tables?

 

Hi, I need to merge these two tables which contain Price and Qty. I have to merge using using Date and Time. Can anyone solve this as there exisits two Time columns  ?

 

QTY VS Price.jpg

 

 

 

 

1 ACCEPTED SOLUTION
v-sihou-msft
Microsoft Employee
Microsoft Employee

@siva3012

 

In this scenario, you can SUMMARIZE your QTY table group on Time_1 and Time_2 into two calculated tables, then UNION these two tables together and build relationship to Price table on Time column.

 

Or you can create a conditional LOOKUP column in Price table to get the QTY from QTY table:

 

Qty =
IF (
    LOOKUPVALUE ( QTY[QTY], QTY[Time1], Price[Time] ) = BLANK (),
    LOOKUPVALUE ( QTY[QTY], QTY[Time2], Price[Time] ),
    LOOKUPVALUE ( QTY[QTY], QTY[Time1], Price[Time] )
)

77.PNG

 

 

Regards,

View solution in original post

3 REPLIES 3
v-sihou-msft
Microsoft Employee
Microsoft Employee

@siva3012

 

In this scenario, you can SUMMARIZE your QTY table group on Time_1 and Time_2 into two calculated tables, then UNION these two tables together and build relationship to Price table on Time column.

 

Or you can create a conditional LOOKUP column in Price table to get the QTY from QTY table:

 

Qty =
IF (
    LOOKUPVALUE ( QTY[QTY], QTY[Time1], Price[Time] ) = BLANK (),
    LOOKUPVALUE ( QTY[QTY], QTY[Time2], Price[Time] ),
    LOOKUPVALUE ( QTY[QTY], QTY[Time1], Price[Time] )
)

77.PNG

 

 

Regards,

KarineLago
Advocate I
Advocate I

@siva3012you have to create an unique value. If your tables doesn't have this property, you can always create your own by concatenating the columns (at Query Editor with a calculated column) that is equal in both tables and then using them to merge.

 

From Brazil? Go to IntelExcel YT channel https://www.youtube.com/user/Intelxcel to learn Power BI.
cs_skit
Resolver IV
Resolver IV

create a calculated column combining the date and the time1 for both tables then merge on that created column

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors