>> Download the sample (Power BI)
This sample provides insights from the payroll datasets produced at the end of this ETL article: Finance - Payroll Tracking, which show the actual, forecast and budgeted payroll and contract staff pay for a particular year.
Payroll Tracking Measures
Section titled “Payroll Tracking Measures”The following specific measures are shown:
- Budgeted Pay [GBP]
- Actual/Forecast Pay [GBP]
- Variance [GBP]
- Variance [%]
Dashboard - Snippet
Section titled “Dashboard - Snippet”![]()
Data Model - Snippet
Section titled “Data Model - Snippet”![]()
Measures
Section titled “Measures”Actual [GBP]
Section titled “Actual [GBP]”[Actual [GBP]]] = CALCULATE ( SUM ( 'Actuals - Payroll (All Lines)'[Value] ), 'Actuals - Payroll (All Lines)'[Expense Line] = "Salary") + CALCULATE ( SUM ( 'Actuals - Payroll (All Lines)'[Value] ), 'Actuals - Payroll (All Lines)'[Expense Line] = "Contract Staff" )Actual/Forecast [GBP]
Section titled “Actual/Forecast [GBP]”[Actual/Forecast [GBP]]] = VAR DateSelect = [Date Select]VAR ActualForecast = IF ( MAX ( 'Date List'[Date] ) <= DateSelect, [Actual [GBP]]], [Forecast [GBP]]] )VAR TotalActuals = SUMX(FILTER(ALL('Actuals - Payroll (All Lines)'[Month]), [Month] <= DateSelect), [Actual [GBP]]])VAR TotalForecast = SUMX(FILTER(ALL('Forecasts - Payroll (Salary Line)'[Date]), [Date] > DateSelect), [Forecast [GBP]]])RETURN IF ( ISFILTERED ( 'Date List'[Date] ), ActualForecast, TotalActuals + TotalForecast )Budget [GBP]
Section titled “Budget [GBP]”[Budget [GBP]]] = CALCULATE ( SUM ( 'Budget - Payroll (Salary Line)'[Value] ) )Date Select
Section titled “Date Select”Date Select = IF ( HASONEVALUE ('Date List Selected'[Date]), VALUES ('Date List Selected'[Date]), 1)Forecast [GBP]
Section titled “Forecast [GBP]”[Forecast [GBP]]] = CALCULATE ( SUM ( 'Forecasts - Payroll (Salary Line)'[Value] ) )Variance [%]
Section titled “Variance [%]”[Variance [%]]] = DIVIDE([Variance [GBP]]], [Budget [GBP]]], BLANK())Variance [GBP]
Section titled “Variance [GBP]”[Variance [GBP]]] = [Budget [GBP]]] - [Actual/Forecast [GBP]]]Calculated Columns
Section titled “Calculated Columns”Business Area
Section titled “Business Area”Business Area = TRIM([Business - P&L]) & " - " & TRIM([Business - Department]) & " - " & TRIM([Business - Sub-Department])Staff Reference
Section titled “Staff Reference”Staff Reference = TRIM([Employee Code]) & " - " & TRIM([Supplier Reference])