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
AnthonyXelya
Helper II
Helper II

Join two tables with intersecting dates

Hello,

 

I have

- a table with the absences of the agents of my enterprise : start and end dates, number of hours missed

- a table with the contracts of the agents : start and end dates, number of work hours per day

 

My goal is to have the number of absence days for each absence by retrieving the right contract line (if there is 2 consecutives contracts lines for one absence, we consider only the first).
Example for the tables : 

AnthonyXelya_0-1635498523300.png


AnthonyXelya_1-1635498541439.png

Thank you!



5 REPLIES 5
AnthonyXelya
Helper II
Helper II

Still nobody to help me? 😞

@AnthonyXelya 

 

Frankly, this might not be a easy thing for DAX. You may also consider using SQL script.

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

How can I do that?

amitchandak
Super User
Super User

@AnthonyXelya , Are you looking , somthing similar to what I have done here

https://community.powerbi.com/t5/Community-Blog/Power-BI-Continuous-Streak-With-More-Than-a-One-Day-...

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

Thank you for your answer, but no, there is no subjet with continuous dates, but with joining two tables based on the intersection of their dates fields.

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.