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! Learn more

Reply
acarmichael
Regular Visitor

Help - joining tables by date

I have two tables, one with number of DL hours worked per day (DD/MM/YY) and one with information for each batch of product completed (Batch ID, Completion date (DD/MM/YY), GalYield).   

Capture.JPG

I want to be able to make a summary chart that calculates the Gallons/Hours for each month but I cannot figure out how to effectively merge/aggregate the tables.  The hours worked table has a unique entry for each day, the Batch table has a unique entry for each batch and could include multiple for each day. 

 

I have tried creating a new table using the Summarize function but cannot get it to join and summarize in one table. 

 

Any tips would be appreciated.  Thank you!

1 ACCEPTED SOLUTION
TeigeGao
Solution Sage
Solution Sage

Hi acarmichael,

Could you please share some sample data to us for analysis?

Based on my understanding is that you want to calculate the Gallons/Hours for each month, the Gallons for each batch of product is based on the complete date.

In this scenario, we can first create a relationship between the two tables using the date, if the DL hours worked per day table has duplicate date, we can create a many to many relationship, else create a one to many relationship.

Then we can create a measure like below:

Gallons/Hours = DIVIDE(SUM('batch of product'[GalYield]),SUM('DL hours'[DL hours ]))

Then we can drag the measure and date to the visual, let date display month:

213213213.png

Best Regards,

Teige

 

View solution in original post

1 REPLY 1
TeigeGao
Solution Sage
Solution Sage

Hi acarmichael,

Could you please share some sample data to us for analysis?

Based on my understanding is that you want to calculate the Gallons/Hours for each month, the Gallons for each batch of product is based on the complete date.

In this scenario, we can first create a relationship between the two tables using the date, if the DL hours worked per day table has duplicate date, we can create a many to many relationship, else create a one to many relationship.

Then we can create a measure like below:

Gallons/Hours = DIVIDE(SUM('batch of product'[GalYield]),SUM('DL hours'[DL hours ]))

Then we can drag the measure and date to the visual, let date display month:

213213213.png

Best Regards,

Teige

 

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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