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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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