Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have an employee dataset just under 2000 rows that includes the following fields:
EMP Num | start date | End date | Expected Hours |
#1 | 1/01/2021 | 30/06/2021 | 38 |
#2 | 1/03/2021 | 25 | |
#3 | 1/01/2019 | 40 |
i want to calculate the total expected hours in the last year for the full workforce and am having difficulty working out how to do this. I'm not sure if i Should try and do this as a measure or calculated column.
I come from an excel background so i would normally step out in columns like so:
HrsPerDay = Expected Hours / 5
StartCalcDate = Max of start date and date 1 year ago.
EndCalcDate = Min of End date and today (or today if blank)
Eligibledays = networkdays between StartCalcDate & EndCalcDate
workhours = Eligibledays * HPD
Solved! Go to Solution.
@Anonymous , refer this HR blog in current employee use per day hours and sum it for total hour
example
Total Hour = CALCULATE(Sumx(FILTER(Employee,Employee[Start Date]<=max('Date'[Date]) && (ISBLANK(Employee[End Date]) || Employee[End Date]>max('Date'[Date]))),(Employee[hour per day ])),CROSSFILTER(Employee[Start Date],'Date'[Date],None))
@Anonymous , refer this HR blog in current employee use per day hours and sum it for total hour
example
Total Hour = CALCULATE(Sumx(FILTER(Employee,Employee[Start Date]<=max('Date'[Date]) && (ISBLANK(Employee[End Date]) || Employee[End Date]>max('Date'[Date]))),(Employee[hour per day ])),CROSSFILTER(Employee[Start Date],'Date'[Date],None))
thanks, exactly what i was after 🙂
User | Count |
---|---|
81 | |
75 | |
70 | |
42 | |
36 |
User | Count |
---|---|
114 | |
56 | |
52 | |
43 | |
42 |