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 need to calculate a running total for days in a week per employee where it resets each week via a calculated column. Data is structured as so:
EmployeeID Hours Workdate Weekend
1 6 1/1/21 1/3/21
1 8 1/2/21 1/3/21
1 8 1/4/21 1/10/21
2 8 1/2/21 1/3/21
2 8 1/4/21 1/10/21
Where total for employees will be as follows:
Employee 1: Weekend 1/3/21 = 14, Weekend 1/10/21 = 8
Employee 2: Weekend 1/3/21 = 8, Weekend 1/10/21 = 8
This is ideally a calculated column so we can tell when an employee reaches 40 hours for the week and comparing it directly to it's workday
Thanks!
Solved! Go to Solution.
@sparkplug93751 , Try like
if( sumx(filter(Table, [Weekend] = earlier([Weekend] ) && [EmployeeID] = earlier([EmployeeID])),[Hours]) >40 , true(), false())
@sparkplug93751 , Try like
if( sumx(filter(Table, [Weekend] = earlier([Weekend] ) && [EmployeeID] = earlier([EmployeeID])),[Hours]) >40 , true(), false())
Hi, the Hours>40 needs to be the running total per day for the week ie days 1 through 3 = 35
Working 10,10,15 hours each day then day 4 will get flagged if you work 8 hitting the total of 43
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 |
---|---|
116 | |
102 | |
77 | |
77 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |