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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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-...

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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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