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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
pedroccamaraDBI
Post Partisan
Post Partisan

Weekdays between 2 dates on dim employee

Hello all
I need to create a measure that calculates the working hours between 2 dates on a dim table.
3 tables : Tab Dates, Tab TimeSheet and Tab Business Leader. The first 2 are connected through dates but with inactive connection because i have 2 other fact table.
This is the desired visual (all numbers here has nothing to do with the file attached)
Desired Result.JPG
and this is the file
https://1drv.ms/x/s!ArcWLnLtPYpTlwwGMmucTS0UIjqA?e=NkOED6 

For the Hours worked for each employee i have this measure:

Ts Hours =
CALCULATE (
SUM ( ‘Tab TimeSheet’[Time (h)] ),
USERELATIONSHIP ( ‘Tab Dates’[Date], ‘Tab TimeSheet’[Date] )
)

Now, what i need is a measure, that shows me the total of hours due to work between date min and date max on the Tab Business Leader, for each employee.

Thanks a lot everyone

Pedro

2 REPLIES 2
amitchandak
Super User
Super User

Hello @amitchandak 
Thank you very much for your answer. Great content.
Unfortunately it's not for my case cose i have 3 tables, like i said above:
Tab Business Leader which is connected to Tab TimeSheet through UserID and employeeID and bothe are conected to dates, but inactive.
The measure i need is the total due hours for each employeeID according to filter dates and datemin and datemax of each employeeID.

Thanks a lot

Helpful resources

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

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.