The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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)
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
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
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
32 | |
14 | |
10 | |
10 | |
9 |