Code
Semantic model

Power BI on Direct Lake, every measure verified

wl_model is a Direct Lake semantic model on the gold tables, defined as code and deployed with the rest of the platform. Each of its 26 DAX measures was run in Power BI and compared with the same number computed independently from the lakehouse: 190 values, all equal. wl_report reads it on four pages.

190 / 190Verified: each measure ran as a DAX query in Power BI Desktop (through pbi-cli, on an Import copy of the same model) and matched DuckDB by month, by account and in total.

Tables

Dategold_dim_date
Usergold_dim_user
Accountgold_dim_account
Projectgold_dim_project
Deliverablegold_dim_deliverable
Workloggold_fact_worklog
Capacitygold_fact_capacity
Assignmentgold_fact_assignment_month
Non-loggersgold_mart_nonloggers
Unmatched Workersgold_audit_unmatched_workers

Relationships (all single direction, many-to-one)

Worklog[Date] → Date[Date]
Worklog[User Key] → User[User Key]
Worklog[Project Key] → Project[Project Key]
Project[Account ID] → Account[Account ID]
Capacity[Date] → Date[Date]
Capacity[User Key] → User[User Key]
Assignment[Month] → Date[Date]
Assignment[User Key] → User[User Key]
Assignment[Deliverable ID] → Deliverable[Deliverable ID]
Assignment[Account ID] → Account[Account ID]

Measures

Time

Hours Logged · Worklog

All hours in worklogs from both systems.

SUM ( Worklog[Hours] )

Billable Hours · Worklog

Hours logged against a CRM account (internal and pending projects excluded).

SUM ( Worklog[Billable] )

Billable Share % · Worklog

Billable hours as a share of all hours logged.

DIVIDE ( [Billable Hours], [Hours Logged] )
Capacity

Capacity Hours · Capacity

Hours expected people could work: working days employed x hours per day.

SUM ( Capacity[Hours] )

Utilization % · Capacity

Billable hours over capacity hours.

DIVIDE ( [Billable Hours], [Capacity Hours] )
Coverage

Expected People · Capacity

People with capacity in the period: enabled, not exempt, employed.

CALCULATE ( DISTINCTCOUNT ( 'User'[User Key] ), Capacity )

Logging People · Capacity

Expected people who logged at least one entry in the period.

VAR expected = CALCULATETABLE ( VALUES ( 'User'[User Key] ), Capacity )
RETURN
    COUNTROWS ( FILTER ( expected, CALCULATE ( NOT ISEMPTY ( Worklog ) ) ) )

Coverage % · Capacity

Logging people over expected people.

DIVIDE ( [Logging People], [Expected People] )

People Not Logging · Capacity

Expected people with no worklog in the period.

[Expected People] - [Logging People]
Identity

Unattributed Hours · Worklog

Hours no person could be matched to (kept in the fact as Unknown).

CALCULATE ( [Hours Logged], Worklog[Matched] = FALSE () )

Unattributed Share % · Worklog

Share of hours waiting on the mapping-file worklist.

DIVIDE ( [Unattributed Hours], [Hours Logged] )
Timeliness

Median Logging Delay (days) · Worklog

Median days between the work date and when the entry was created.

MEDIAN ( Worklog[Delay Days] )

Logged Within 7 Days % · Worklog

Share of entries created within a week of the work date.

DIVIDE (
    CALCULATE ( COUNTROWS ( Worklog ), Worklog[Delay Days] <= 7 ),
    COUNTROWS ( Worklog )
)
Sold vs utilized

Assigned Hours · Assignment

Hours sold through CRM assignments, prorated by month and allocation.

SUM ( Assignment[Hours] )

Sold Value · Assignment

Assigned hours priced at each deliverable's rate.

SUMX ( Assignment, Assignment[Hours] * RELATED ( Deliverable[Rate] ) )

Average Sold Rate · Assignment

Sold value per assigned hour.

DIVIDE ( [Sold Value], [Assigned Hours] )

Sold Utilization % · Assignment

Billable hours delivered over hours sold.

DIVIDE ( [Billable Hours], [Assigned Hours] )

Unused Sold Hours · Assignment

Sold hours not covered by billable work (never negative).

MAX ( 0, [Assigned Hours] - [Billable Hours] )
Time intelligence

Hours Logged PM · Worklog

Hours logged in the previous month (Date is the marked date table).

CALCULATE ( [Hours Logged], DATEADD ( 'Date'[Date], -1, MONTH ) )

Hours Logged MoM % · Worklog

Change in hours logged against the previous month.

VAR prior = [Hours Logged PM]
RETURN
    DIVIDE ( [Hours Logged] - prior, prior )

Hours Logged YTD · Worklog

Hours logged from 1 January to the end of the current filter.

TOTALYTD ( [Hours Logged], 'Date'[Date] )

Utilization % PM · Capacity

Utilization in the previous month.

CALCULATE ( [Utilization %], DATEADD ( 'Date'[Date], -1, MONTH ) )

Utilization Change (pts) · Capacity

Percentage-point change in utilization against the previous month.

VAR prior = [Utilization % PM]
RETURN
    IF ( NOT ISBLANK ( prior ), [Utilization %] - prior )
Review

Worklist Hours · Unmatched Workers

Hours waiting on a mapping-file entry.

SUM ( 'Unmatched Workers'[Hours] )

Worklist Entries · Unmatched Workers

Worklog entries waiting on a mapping-file entry.

SUM ( 'Unmatched Workers'[Entries] )

Days Without Logging · Non-loggers

Days since the person last logged (blank: never logged).

MAX ( 'Non-loggers'[Days Since Last Log] )

Report pages

  • Overview: utilization, coverage, hours, unattributed share; trends by month; billable hours by account; a department matrix
  • Time & coverage: utilization and coverage trend, capacity vs billable hours, logging timeliness by department
  • Sold vs utilized: sold value, assigned vs billable hours by account, an account scorecard
  • Review worklist: identities waiting on the mapping file, expected people not logging