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
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
July 2025 community update carousel

Fabric Community Update - July 2025

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

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.