Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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 🙂
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
76 | |
58 | |
35 | |
33 |
User | Count |
---|---|
100 | |
60 | |
56 | |
46 | |
41 |