>> Download the sample (Power BI)
HR - Staffing Levels over time, based on each Member’s Join and Leave dates
Section titled “HR - Staffing Levels over time, based on each Member’s Join and Leave dates”This sample shows staffing levels over time, based on each staff member’s join and leave dates.
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Employees
Section titled “Measures - Employees”Current Staff
Section titled “Current Staff”Current Staff =CALCULATE ( COUNTROWS ( Staff_Levels ), FILTER ( VALUES ( Staff_Levels[Start Date] ), Staff_Levels[Start Date] <= MAX ( Calendar_Table[Date] ) ), FILTER ( VALUES ( Staff_Levels[End Date] ), OR ( Staff_Levels[End Date] >= MIN ( Calendar_Table[Date] ), ISBLANK ( Staff_Levels[End Date] ) ) ))Tables
Section titled “Tables”Calendar_Table
Section titled “Calendar_Table”Calendar_Table =GENERATE ( CALENDAR ( DATE ( 2017, 1, 1 ), DATE ( 2019, 12, 31 ) ), VAR currentDay = [Date] VAR Day = DAY ( currentDay ) VAR Month = MONTH ( currentDay ) VAR Year = YEAR ( currentDay ) RETURN ROW ( "Day", day, "Month", month, "Year", year ))