Skip to content

Finance - Payroll Tracking

>> 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.

The following specific measures are shown:

  1. Budgeted Pay [GBP]
  2. Actual/Forecast Pay [GBP]
  3. Variance [GBP]
  4. Variance [%]

[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]]] = 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]]] = CALCULATE ( SUM ( 'Budget - Payroll (Salary Line)'[Value] ) )
Date Select = IF (
HASONEVALUE ('Date List Selected'[Date]),
VALUES ('Date List Selected'[Date]),
1
)
[Forecast [GBP]]] = CALCULATE ( SUM ( 'Forecasts - Payroll (Salary Line)'[Value] ) )
[Variance [%]]] = DIVIDE([Variance [GBP]]], [Budget [GBP]]], BLANK())
[Variance [GBP]]] = [Budget [GBP]]] - [Actual/Forecast [GBP]]]
Business Area = TRIM([Business - P&L]) & " - " & TRIM([Business - Department]) & " - " & TRIM([Business - Sub-Department])
Staff Reference = TRIM([Employee Code]) & " - " & TRIM([Supplier Reference])