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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors