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.
I am working on a timesheet report and facing one issue.
As of now, to calculate Available Hours of employees we are calculating based on
Count of Employees selected * Count of Weeks Selected * 40
Now manager requesting to calculate Available hours based on Employee’s joining date.
Employee JoinDate
E1 05/02/2021
E2 25/01/2021
E3 15/03/2020
If I am selecting 3 employees from Team Slicer and first 3 months of 2021, so for E1 and E2 employees it should calculate from their joining date and not from the week selected and for E3 it should calculate from first week selected as it is greater than joining date.
@Anonymous , Try like
new measure =
var _max = maxx(allselected('Date'), Date[Date])
var _min1 = maxx(allselected('Date'), Date[Date])
var _min = max(_min1, min(employee[joining date])
return
sumx(values(Employee[Employee]), calculate(datediff(_min1, _max,week))*40)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
19 |