Metrics

Every metric on a Zeo company report, one entry each: the reports and rows it appears on, other names, a plain-English definition, the SQL that produces it, and its pitfalls. A metric that appears on several reports with the same definition is one entry with several report tags; if two reports compute it differently, each version gets its own entry.

Status: Draft. No owner has confirmed these definitions yet. Reports covered so far: Weekly KPI Report, Funding Dashboard, Executive Dashboard, Sr Staff, the Engineering Dashboard, Monthly Review, Install Forecast, Crew Capacity, the Install Crew Leaderboard, Ops Leaderboards, the Operations Dashboard, the SLA Dashboard, Commission Close, Orphaned Projects, Procurement Daily and Customer Contact; see Reports for where each one's definitions come from. Older drafts for other reports are on Key metrics and Metric conflicts until they move here.

Using the SQL

Sale dates: Submitted vs Closed

A project is Sold when Deal Review finishes its verification: Project Closed (OSC 687). Sales calls this Closed. Project Submitted (OSC 660) is only the day the project was submitted to Albatross. Many reports were built when OSC 660 meant "Sold", so they still count, cohort or time "sales" from it. Their numbers are submissions, which run ahead of sales and include deals that never pass Deal Review. (Decided by Michael Lowry, 2026-12-02.)

Every metric that counts, cohorts or times projects by a sale date says which date it uses, in a Sale date line. Use the Sale date filter above to list them. A few use a third date, the main contract's signed date (OSC 23).

Reports

Rules that apply to every metric on a report, unless the metric's entry says otherwise. They're the most common source of mismatched numbers.

Weekly KPI Report

The Monday report for directors: 119 rows in 13 sections, one owner and one target per row. Names, owners and targets are from Kalen's published report for week 44 (2026-11-02); the SQL is Lumen's port, packages/core/src/kpi-weekly/ in the Lumen repo, as of 2026-12-02.

Funding Dashboard

QuickSight's Funding Dashboard (one sheet), ported to Lumen as Funding Pass Rates. M1 and M2 funding's internal QC and financier pass rates, their counts, and what the rejections were. Written from QuickSight's datasets and calculated fields (exported 2026-11-04) and Lumen's port, as of 2026-12-02.

Executive Dashboard

QuickSight's Zeo Energy Executive analysis, ported to Lumen as the Executive reports. All eight sheets are here: the project sheets (Sales, Installs, PTO, Monthly Goals, TV Dashboard, Sales PTO) and the Funding and Funding Forecast sheets. Written from QuickSight's export and Lumen's port, as of 2026-12-02.

Sr Staff

QuickSight's Sr Staff analysis, ported to Lumen as four Sr Staff reports: Sr Staff Meeting Report, Sr Staff Drilldown, Financier Timelines and Delivery Date Analysis. Written from QuickSight's export and Lumen's port, and checked on Phoenix for October 2026, as of 2026-12-02.

Engineering Dashboard

QuickSight's Engineering 2.0 analysis (sheets Volume & SLAs, SLA Delays, As-Builts, PremiumCAD and Productivity Data), ported to Lumen as the Engineering reports beside Lumen's own Engineering Cycles and Supernova Savings, written from both and checked on Phoenix for October 2026, as of 2026-12-02.

Monthly Review

Lumen's slides for Cody's monthly engineering planning meeting: last month's engineering goals against what happened, with the previous month beside each and every month on a line. A new sheet, not a QuickSight port. Checked on Phoenix for October 2026, as of 2026-12-02.

Install Forecast

QuickSight's install_forecast analysis, ported to Lumen as two reports, Install Forecast and M1 Forecast: installs (and M1 approvals) done this year plus those a model expects, against crew capacity. Written from QuickSight's export and Lumen's port, and checked on Phoenix as of 2026-12-02.

Crew Capacity

QuickSight's Crew Capacity analysis (dashboard Crew Capacity Dashboard), ported to Lumen as three reports, Installation, Inspection and Scheduling: who is booked on which days, and what got scheduled. Written from QuickSight's export and Lumen's port, and checked on Phoenix for October 2026.

Install Crew Leaderboard

QuickSight's install_crew_leaderboard analysis, ported to Lumen as five reports, Installations, Inspections, Funding, Total Performance and Field Throughput by Market: each install crew's field audit, inspection and M1 results, and each warehouse's install backlog. Written from QuickSight's export and Lumen's port, and checked on Phoenix for October 2026 (Field Throughput as of 2026-12-02).

Ops Leaderboards

QuickSight's Ops Leaderboards (13 sheets of four tables) ported to Lumen as one sheet of 13 boards: who did each pipeline step. Checked on Phoenix for October 2026.

Operations Dashboard

QuickSight's Operations Dashboard, ported to Lumen as five reports: Permitting, Utilities, Inspections, Deal Review and Field Audit. Checked on Phoenix for October 2026.

SLA Dashboard

QuickSight's SLA Dashboard, ported to Lumen as three reports: Active Pipeline, Department Throughput and Out of SLA Trends. Checked on Phoenix as of 2026-12-03 (Active Pipeline) and for October 2026.

Commission Close

Michael Lowry's two month-end close queries for finance, ported to Lumen as two sheets, Paid, Not IV and IV, Not Paid, with no QuickSight twin. Not checked on Phoenix: its MCP refuses the commission schema.

Orphaned Projects

Lumen's Orphaned Projects sheet: open projects in no work queue, each sorted into a cleanup bucket, the same logic as the orphaned-projects-report skill and the data dictionary's Orphaned projects page. Checked on Phoenix as of 2026-12-03.

Procurement Daily

Lumen's Procurement Daily page, which replaces Albatross's Procurement tab, from the mockup Michael Lowry approved on 2026-11-30; no QuickSight twin. Checked on Phoenix for October 2026 (queues and the at-risk count as of 2026-12-03).

Customer Contact

Lumen's Customer Contact page: active customers who have gone 7 days or more without a call or text from us, against the rule that every active customer hears from us weekly (Michael Lowry, 2026-11-30). Checked on Phoenix as of 2026-12-03 and for October 2026's weeks.

Metrics

Sold (Residential solar)

Weekly KPI Report row 1, Milestone Volume · owner Charles · target ≥ period sold goal ÷ weeks in the period

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Gross sold; projects sold; contracts signed; Project Submitted (the field); Project Milestones-Project Sold (rule label)

Definition: Residential solar projects whose contract was signed during the week.

SQL
select '1' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.osc_660 >= :week_start and p.osc_660 < :week_end

Pitfalls:

  • Gross, not net: a project canceled later still counts in the week it was sold. Cancellations are rows 18 to 20.
  • Residential solar only. Battery Only, R&R and Roof sales are rows 1a to 1c and are not in this number.
  • "Sold" is the Project Submitted date (OSC 660), stamped when the contract completes. QuickSight's Gross Sales dates some sales by the contract date instead, so the two can land in different weeks.

Sold: Battery Only

Weekly KPI Report row 1a, Milestone Volume · owner Charles · target none (Track)

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Battery sales

Definition: Battery Only projects whose contract was signed during the week.

SQL
select '1a' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 23 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.osc_660 >= :week_start and p.osc_660 < :week_end

Pitfalls:

  • Not included in row 1 and has no target.

Sold: R&R

Weekly KPI Report row 1b, Milestone Volume · owner Charles · target none (Track)

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: R&R sales; Removal & Reinstall sold

Definition: R&R / Roof projects with Removal & Reinstall scope that were sold during the week.

SQL
select '1b' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 7 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Removal%' and ',' || trim(both '{}' from cast(p.osc_2319 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%')
  and coalesce(p.osc_2929, p.osc_2458, p.osc_660) >= :week_start and coalesce(p.osc_2929, p.osc_2458, p.osc_660) < :week_end

Pitfalls:

  • A combined Removal & Reinstall + Reroof job counts in both 1b and 1c, so don't add 1b and 1c together.
  • Dated by the R&R sold date (OSC 2929), else OSC 2458, else Project Submitted (OSC 660).

Sold: Roof

Weekly KPI Report row 1c, Milestone Volume · owner Charles · target none (Track)

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Roof sales; Reroof sold

Definition: R&R / Roof projects with Reroof scope that were sold during the week.

SQL
select '1c' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 7 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and exists (select 1 from phoenix.list_value lv where lv.list_value ilike '%Reroof%' and ',' || trim(both '{}' from cast(p.osc_2319 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%')
  and coalesce(p.osc_2929, p.osc_2458, p.osc_660) >= :week_start and coalesce(p.osc_2929, p.osc_2458, p.osc_660) < :week_end

Pitfalls:

  • Overlaps row 1b on combined jobs (see 1b).

Sold kW

Weekly KPI Report row 2, Milestone Volume · owner Charles · target ≥ 8.4 kW × the weekly sold goal

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: kW sold; sold capacity

Definition: Total system size, in kW, of the projects counted in row 1.

SQL
select '2' as "row",
  sum(case when x.kw > 1000 then x.kw / 1000.0 else x.kw end) as "value",
  count(x.kw)::numeric as "num", null::numeric as "den"
from (
  select (
    select cast(nullif(cast(c.osc_35 as varchar), '') as numeric)
    from data_map_1.dm_pb_3_data c
    where c.project_id = p.project_id and c.archived = false
    order by c.date_modified desc
    limit 1
  ) as kw
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.osc_660 >= :week_start and p.osc_660 < :week_end
) x

Pitfalls:

  • Reads the system size on the contract block (PB 3, OSC 35), not the size finally installed (row 11).
  • A value over 1,000 is assumed to be watts and divided by 1,000.
  • Projects with no size are left out, not counted as zero, so row 2 ÷ row 1 understates kW per project when sizes are missing. The query's num column says how many projects had a size.

Project Closed

Weekly KPI Report row 3, Milestone Volume · owner Charles · target ≥ 85% of the weekly sold goal

Sale date: Closed (OSC 687), the day the project Sold.

Also called: Deal Review complete; Closed; Project Closed (the field); Project Milestones-Deal Review Complete (rule label)

Definition: Residential solar projects that finished Deal Review during the week.

SQL
select '3' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.osc_687 >= :week_start and p.osc_687 < :week_end

Pitfalls:

  • "Closed" is the end of Deal Review, not the end of the job.
  • Deal Review completes only after NTP (M0), so this row moves with financier approvals, not just Deal Review work.

Plan Set Created

Weekly KPI Report row 5, Milestone Volume · owner Brendan · target flow target from row 3 and row 29

Also called: Plan sets; PS created

Definition: Residential solar projects whose plan set was created during the week (Plan Set Created, OSC 662).

SQL
select '5' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.osc_662 >= :week_start and p.osc_662 < :week_end

Pitfalls:

  • Keeps the first plan set's date: a revision doesn't change it, so revisions aren't counted again.
  • Counts projects, not plan sets. Lumen's engineering reports count plan set blocks and will be higher.

NEM Application Submitted

Weekly KPI Report row 5a, Milestone Volume · owner Carson · target flow target from row 5 and row 30

Also called: NEM submitted; net metering applications

Definition: Residential solar projects whose NEM (net metering) application went to the utility during the week (OSC 1116).

SQL
select '5a' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.osc_1116 >= :week_start and p.osc_1116 < :week_end

Pitfalls:

  • Only recorded from week 8 of 2026; earlier weeks and last-year comparisons are not meaningful.
  • The button is repeatable, but it doesn't overwrite: the field keeps the first submission date.
  • Lumen's NEM reports read the NEM block's own date (PB 18, OSC 1200), so their counts differ.

Permit Submitted

Weekly KPI Report row 6, Milestone Volume · owner Natalie · target flow target from row 5 and row 30

Also called: Permits submitted; First Permit Submitted (the field)

Definition: Residential solar projects that submitted a permit during the week (OSC 664).

SQL
select '6' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.osc_664 >= :week_start and p.osc_664 < :week_end

Pitfalls:

  • Keeps the first permit submission, as its name First Permit Submitted says; later permits don't change it.
  • Barely recorded in 2025, so last-year comparisons understate 2025.

All Permits Approved

Weekly KPI Report row 7, Milestone Volume · owner Natalie · target flow target from row 5 and row 30

Also called: Permits approved; permit approved

Definition: Residential solar projects whose permits were all approved during the week (OSC 666).

SQL
select '7' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.osc_666 >= :week_start and p.osc_666 < :week_end

Pitfalls:

  • Keeps the first date: a revision or as-built Permitting block closing doesn't change it.

Ready to Schedule

Weekly KPI Report row 8, Milestone Volume · owner Allie · target flow target from row 5 and row 30

Also called: RTS; ready to install

Definition: Residential solar projects that became ready to schedule for install during the week (OSC 667).

SQL
select '8' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.osc_667 >= :week_start and p.osc_667 < :week_end

Pitfalls:

  • Keeps the first RTS date, as Kalen's notes say: a project that becomes RTS again isn't counted again.

Orders

Weekly KPI Report row 8a, Milestone Volume · owner Cody · target flow target from row 8 and row 31

Also called: Material orders; install material ordered

Definition: Residential solar projects whose install material was ordered during the week, read from the first install appointment that has an order date (OSC 2511).

SQL
select '8a' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from (
  select (
    select e.osc_2511::date
    from data_map_1.dm_ev_41_data e
    where e.project_id = p.project_id and e.archived = false and e.osc_2511 is not null
    order by e.start_time, e.project_process_block_event_id
    limit 1
  ) as ordered
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
) x
where x.ordered >= :week_start and x.ordered < :week_end

Pitfalls:

  • Recorded from March 2026 only.
  • A project with no install appointment yet is never counted, even if material was ordered.

Install Verified (Residential solar)

Weekly KPI Report row 10, Milestone Volume · owner Brian · target ≥ period install goal ÷ weeks in the period

Also called: IV; installs; installs verified; the IV goal

Definition: Residential solar projects whose install was verified as complete during the week (Install Verified, OSC 671).

SQL
select '10' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.osc_671 >= :week_start and p.osc_671 < :week_end

Pitfalls:

  • Residential solar only; Battery Only, R&R and Roof installs are rows 10a to 10c.
  • Other reports (Lumen's As-Built Rates, some QuickSight sheets) count installs from block-level dates or with other filters, so their totals differ.

Installs: Battery Only

Weekly KPI Report row 10a, Milestone Volume · owner Brian · target none (Track)

Also called: Battery installs

Definition: Battery Only projects whose install was verified during the week.

SQL
select '10a' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 23 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.osc_671 >= :week_start and p.osc_671 < :week_end

Pitfalls:

  • Not included in row 10 and has no target.

Installs: R&R

Weekly KPI Report row 10b, Milestone Volume · owner Brian · target none (Track)

Also called: R&R installs; reinstalls

Definition: R&R / Roof projects whose reinstallation was completed during the week (Reinstallation Completed, OSC 2944).

SQL
select '10b' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 7 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.osc_2944 >= :week_start and p.osc_2944 < :week_end

Pitfalls:

  • Uses a different field from solar installs; no target.

Installs: Roof

Weekly KPI Report row 10c, Milestone Volume · owner Brian · target none (Track)

Also called: Roof installs; reroofs completed

Definition: R&R / Roof projects whose roof was completed during the week (Roof Completed, OSC 4171, else OSC 2466).

SQL
select '10c' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 7 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and coalesce(p.osc_4171, p.osc_2466) >= :week_start and coalesce(p.osc_4171, p.osc_2466) < :week_end

Pitfalls:

  • No target.

kW Installed

Weekly KPI Report row 11, Milestone Volume · owner Brian · target ≥ 9.05 kW × the weekly install goal

Also called: Capacity installed; installed kW

Definition: Total system size, in kW, of the projects counted in row 10.

SQL
select '11' as "row",
  sum(case when x.kw > 1000 then x.kw / 1000.0 else x.kw end) as "value",
  count(x.kw)::numeric as "num", null::numeric as "den"
from (
  select coalesce(
    (
      select cast(nullif(cast(i.osc_1349 as varchar), '') as numeric)
      from data_map_1.dm_pb_11_data i
      where i.project_id = p.project_id and i.archived = false and i.osc_1349 is not null
      order by i.date_modified desc
      limit 1
    ),
    (
      select cast(nullif(regexp_replace(cast(s.osc_916 as varchar), '[^0-9.]', '', 'g'), '') as numeric)
      from data_map_1.dm_pb_5_data s
      where s.project_id = p.project_id and s.archived = false and s.osc_916 is not null
      order by s.date_modified desc
      limit 1
    )
  ) as kw
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.osc_671 >= :week_start and p.osc_671 < :week_end
) x

Pitfalls:

  • Reads the size on the latest Installation block (PB 11, OSC 1349), else the latest Designed System Size on Scope Review (OSC 916).
  • Over 1,000 is assumed to be watts. Projects with no size are left out, not zero.
  • Lumen's Executive report also falls back to the contract kW; this row doesn't, so it can be lower.

All Inspections Passed

Weekly KPI Report row 12, Milestone Volume · owner Brooke · target flow target from row 10 and row 33

Also called: Inspections passed; final inspection passed

Definition: Residential solar projects that passed final inspection during the week.

SQL
select '12' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and coalesce(p.osc_674, (
    select min(e.start_time)::date
    from data_map_1.dm_ev_42_data e
    join phoenix.object_status es on es.id = e.object_status_id
    where e.project_id = p.project_id and e.archived = false
      and es.object_status = 'Inspection Passed'
  )) >= :week_start and coalesce(p.osc_674, (
    select min(e.start_time)::date
    from data_map_1.dm_ev_42_data e
    join phoenix.object_status es on es.id = e.object_status_id
    where e.project_id = p.project_id and e.archived = false
      and es.object_status = 'Inspection Passed'
  )) < :week_end

Pitfalls:

  • Uses Inspection Passed (OSC 674), and when that's blank, the first Final Inspection appointment marked Inspection Passed.
  • Counts projects, not inspections.

PTO Approved

Weekly KPI Report row 14, Milestone Volume · owner Carson · target flow target from row 12 and row 34

Also called: PTO; permission to operate

Definition: Residential solar projects that got utility permission to operate during the week (OSC 676).

SQL
select '14' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.osc_676 >= :week_start and p.osc_676 < :week_end

Pitfalls: None beyond the report's rules.

M0 Approved

Weekly KPI Report row 15, Milestone Volume · owner Devan · target ≥ 95% of the weekly sold goal

Also called: NTP; notice to proceed; M0 (NTP) Approved (the field)

Definition: Residential solar projects that got M0 (notice to proceed) approval during the week. For cash deals, the week the M0 invoice was paid.

SQL
select '15' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and coalesce(p.osc_680, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1937)) >= :week_start and coalesce(p.osc_680, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1937)) < :week_end

Pitfalls:

  • Keeps the first approval: resolving stips doesn't change the date.
  • Includes cash deals through the Cash Funding block (PB 32, OSC 1937); Lumen's funding reports don't.

M1 Approved

Weekly KPI Report row 16, Milestone Volume · owner Colton · target ≥ 90% of the weekly install goal

Also called: M1 funded; M1 approvals

Definition: Residential solar projects whose M1 funding was approved during the week. For cash deals, the week the M1 invoice was paid.

SQL
select '16' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and coalesce(p.osc_682, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1940)) >= :week_start and coalesce(p.osc_682, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1940)) < :week_end

Pitfalls:

  • Uses the project-level date (OSC 682). Lumen's funding reports use the M1 block's date (PB 26, OSC 1161), which can be 1 to 7 days different, and count blocks, not projects.
  • Includes cash deals (PB 32, OSC 1940).

M2 Approved

Weekly KPI Report row 17, Milestone Volume · owner Colton · target ≥ 85.5% of the weekly install goal

Also called: M2 funded; M2 approvals

Definition: Residential solar projects whose M2 funding was approved during the week. For cash deals, the week the M2 invoice was paid.

SQL
select '17' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and coalesce(p.osc_685, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1943)) >= :week_start and coalesce(p.osc_685, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1943)) < :week_end

Pitfalls:

  • Same differences from Lumen's funding reports as row 16. Cash fallback is OSC 1943.

Pre-Install > 60 Days, Not Install Verified

Weekly KPI Report row 17a, Milestone Volume · owner Allie · target none (Decreasing)

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Pre-install aging; old pre-install

Definition: Active projects sold more than 60 days ago that still aren't install verified, counted at the end of the week.

SQL
select '17a' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Sales Hold', 'On Hold', 'Legal Hold'))
  and p.osc_660 < :week_end - 60
  and (p.osc_671 is null or p.osc_671 >= :week_end)

Pitfalls:

  • Excludes holds (Sales, On, Legal Hold), Cancellation in Progress, Canceled and Finalized. Those are rows 35a and 35b.
  • The exclusions use each project's status today, so rerunning an old week won't match what was reported that week.

Install Verified > 60 Days, Not PTO

Weekly KPI Report row 17b, Milestone Volume · owner Nichole · target none (Decreasing)

Also called: Post-install aging; installed not PTO

Definition: Active projects install verified more than 60 days ago that still don't have PTO, counted at the end of the week.

SQL
select '17b' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Sales Hold', 'On Hold', 'Legal Hold'))
  and p.osc_671 < :week_end - 60
  and (p.osc_676 is null or p.osc_676 >= :week_end)

Pitfalls:

  • Same exclusions and same today's-status caveat as 17a.

Install Verified > 60 Days, Not PTO (excl. Compliance)

Weekly KPI Report row 17c, Milestone Volume · owner Nichole · target none (Decreasing)

Also called: Installed not PTO, excluding compliance

Definition: Row 17b, minus projects with an open Resolutions block (formerly Compliance Resolution) at the end of the week.

SQL
select '17c' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Sales Hold', 'On Hold', 'Legal Hold'))
  and p.osc_671 < :week_end - 60
  and (p.osc_676 is null or p.osc_676 >= :week_end)
  and not exists (
    select 1
    from phoenix.project_process_block b
    join phoenix.object_status bs on bs.id = b.object_status_id
    where b.project_id = p.project_id and b.archived = false
      and b.process_block_id = 20
      and b.date_created < :week_end
      and (bs.object_status = 'Resolution in Progress'
        or (bs.object_status in ('Resolved', 'Not Needed', 'Canceled')
          and b.date_modified >= :week_end))
  )

Pitfalls:

  • The block was renamed from Compliance Resolution to Resolutions in late 2026; the SQL finds it by id (PB 20), so the rename doesn't break it.

Cancellations Started

Weekly KPI Report row 18, Sales Quality · owner Charles · target none (Track)

Also called: Cancels; cancellation requests

Definition: Residential solar projects that had a cancellation request started during the week (a Request Cancellation block created).

SQL
select '18' as "row", count(distinct c.project_id) as "value", null::numeric as "num",
  null::numeric as "den"
from data_map_1.dm_pb_19_data c
join data_map_1.dm_project_data p on p.project_id = c.project_id
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and c.date_created >= :week_start and c.date_created < :week_end

Pitfalls:

  • Counts requests started, not finished: a saved deal still counts.
  • A project with two requests in the same week counts once.

Cancel % of Sold (30-day)

Weekly KPI Report row 19, Sales Quality · owner Charles · target ≤ 40%

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Cancel rate; 30-day cancel rate

Definition: Of the projects sold 5 to 8 weeks ago, the share that are now Canceled or Cancellation in Progress.

SQL: Not one query. Each week the run saves row 19w (below) for that week's sales. Row 19 = sum of 19w over weeks −8 to −5 ÷ sum of row 1 over the same weeks.

Row 19w:

SQL
select '19w' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.osc_660 >= :week_start and p.osc_660 < :week_end
  and p.object_status_id in (select os.id from phoenix.object_status os
    where os.object_status in ('Canceled', 'Cancellation in Progress'))

Pitfalls:

  • A four-week cohort, not this week's sales: week −8 to week −5 of cancels ÷ the same weeks' row 1.
  • Each week's cancel count is saved once, when that week is run, and never recounted. Rerunning the SQL today will give a different (usually higher) number, because more of those projects have canceled since.
  • Not the same as rows 18 (requests started) or 20 (early cancels).

Early Cancel % (≤ 7 days)

Weekly KPI Report row 20, Sales Quality · owner Charles · target ≤ 25%

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Early cancel rate

Definition: Of the projects sold 5 to 8 weeks ago, the share that had a cancellation request within 7 days of the sale.

SQL: Not one query. Each week the run saves row 20w (below). Row 20 = sum of 20w over weeks −8 to −5 ÷ sum of row 1 over the same weeks.

Row 20w:

SQL
select '20w' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.osc_660 >= :week_start and p.osc_660 < :week_end
  and exists (
    select 1 from data_map_1.dm_pb_19_data c
    where c.project_id = p.project_id and c.date_created::date - p.osc_660::date <= 7
  )

Pitfalls:

  • Same saved, four-week cohort as row 19.
  • A request dated before the sale date also counts as "within 7 days".

Cancel Reason Unknown %

Weekly KPI Report row 21, Sales Quality · owner Charles · target ≤ 10%

Also called: Unknown cancel reason

Definition: Of the cancellation requests started during the week (row 18), the share whose reason is "Unknown (Customer Didn't Provide)".

SQL
select '21' as "row", x.unk::numeric / nullif(x.started, 0) as "value", x.unk::numeric as "num",
  x.started::numeric as "den"
from (
  select count(distinct c.project_id) as started,
    count(distinct case when exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Unknown (Customer Didn%' and ',' || trim(both '{}' from cast(c.osc_938 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%')
      then c.project_id end) as unk
  from data_map_1.dm_pb_19_data c
  join data_map_1.dm_project_data p on p.project_id = c.project_id
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and c.date_created >= :week_start and c.date_created < :week_end
) x

Pitfalls:

  • A blank reason does not count as unknown; only that exact list value does.

Clean Sale %

Weekly KPI Report row 22, Sales Quality · owner Charles · target ≥ 75%

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Clean deal rate; clean sales

Definition: Of the projects sold during the week that have been reviewed, the share marked Clean Sale.

SQL
select '22' as "row", x.t::numeric / nullif(x.t + x.f, 0) as "value", x.t::numeric as "num",
  (x.t + x.f)::numeric as "den"
from (
  select sum(case when p.osc_1991 = true then 1 else 0 end) as t,
    sum(case when p.osc_1991 = false then 1 else 0 end) as f
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.osc_660 >= :week_start and p.osc_660 < :week_end
) x

Pitfalls:

  • Projects whose Clean Sale box (OSC 1991) is still blank are left out of both the top and the bottom, so a week with many unreviewed deals can show a high rate on few projects.
  • Dated by the sale week, so the number for a recent week keeps changing as deals get reviewed.

Deals Not Yet Reviewed (> 7 days)

Weekly KPI Report row 23, Sales Quality · owner Charles · target 0

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Unreviewed deals; Deal Review backlog

Definition: Active projects sold more than 7 days ago that haven't had their Clean Sale decided or finished Deal Review, counted at the end of the week.

SQL
select '23' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Sales Hold', 'On Hold', 'Legal Hold')) and p.osc_1991 is null and p.osc_687 is null
  and p.osc_660 < :week_end - 7

Pitfalls:

  • Projects already Project Closed are left out even when Clean Sale is blank, to skip sales from before Clean Sale was in use.
  • Holds are left out.

At-Risk Deals

Weekly KPI Report row 25, Sales Quality · owner Charles · target none (Track)

Sale date: Closed (OSC 687), the day the project Sold.

Also called: At-risk deals

Definition: Active projects that are dirty and not yet closed, or in an open Extended Review, or on hold before install, counted at the end of the week.

SQL
select '25' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized'))
  and (
    (p.osc_1991 = false and p.osc_687 is null)
    or exists (
      select 1
      from phoenix.project_process_block b
      join phoenix.object_status bs on bs.id = b.object_status_id
      where b.project_id = p.project_id and b.process_block_id = 52 and b.archived = false
        and bs.object_status in ('Active', 'On Hold')
    )
    or (p.object_status_id in (select os.id from phoenix.object_status os where os.object_status in ('Sales Hold', 'On Hold', 'Legal Hold')) and p.osc_671 is null)
  )

Pitfalls:

  • A project in more than one group counts once.

Active Closers (30-day)

Weekly KPI Report row 26a, Sales Quality · owner Charles · target none (Track)

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Active closers

Definition: Closers with at least one Residential solar sale in the 30 days to the end of the week.

SQL
select '26a' as "row", count(distinct po.user_position_id) as "value", null::numeric as "num",
  null::numeric as "den"
from data_map_1.dm_project_data p
join phoenix.project_owner po
  on po.project_id = p.project_id and po.owner_type_assignment_id = 3
    and po.archived = false
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.osc_660 >= :week_end - 30 and p.osc_660 < :week_end

Pitfalls:

  • Uses the Closer currently on the project. A replaced Closer drops out.

Active Setters (30-day)

Weekly KPI Report row 26b, Sales Quality · owner Charles · target none (Track)

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Active setters

Definition: Setters with at least one Residential solar sale in the 30 days to the end of the week.

SQL
select '26b' as "row", count(distinct po.user_position_id) as "value", null::numeric as "num",
  null::numeric as "den"
from data_map_1.dm_project_data p
join phoenix.project_owner po on po.project_id = p.project_id and po.archived = false
join phoenix.owner_type_assignment ota on ota.id = po.owner_type_assignment_id
join phoenix.owner_type ot on ot.id = ota.owner_type_id
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and ot.owner_type ilike '%setter%'
  and p.osc_660 >= :week_end - 30 and p.osc_660 < :week_end

Pitfalls:

  • Same as 26a, for Setters.

Sales per Active Closer

Weekly KPI Report row 27, Sales Quality · owner Charles · target none (Set after baseline)

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Sales per closer; closer productivity

Definition: Projects sold this week ÷ active closers.

SQL: Row 1 ÷ row 26a for the same week.

Pitfalls:

  • Divides one week of sales by a 30-day closer count, so it reads low against a monthly view.
  • No target until a baseline is set.

Sold → Project Closed: Weeks of Backlog

Weekly KPI Report row 28, Pipeline & Weeks of Capacity · owner Charles · target ≤ 1 weeks

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: "Sold → Project Closed" (Weekly KPI Report label); Sold stage backlog; Deal Review weeks of capacity

Definition: How many weeks of work sit between Sold and Project Closed: projects in that stage at week end ÷ the average weekly Project Closed count over the last four weeks.

SQL
select '28' as "row", s.n / nullif(x.n / 4.0, 0) as "value", s.n::numeric as "num",
  x.n / 4.0 as "den"
from (
  select count(*) as n
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Sales Hold', 'On Hold', 'Legal Hold'))
    and p.osc_660 < :week_end and (p.osc_676 is null or p.osc_676 >= :week_end)
    and case
    when p.osc_675 < :week_end then 675 when p.osc_674 < :week_end then 674
    when p.osc_671 < :week_end then 671 when p.osc_669 < :week_end then 669
    when p.osc_667 < :week_end then 667 when p.osc_666 < :week_end then 666
    when p.osc_664 < :week_end then 664 when p.osc_662 < :week_end then 662
    when p.osc_661 < :week_end then 661 when p.osc_687 < :week_end then 687
    else 660 end in (660)
) s
cross join (
  select count(*) as n
  from (select p.osc_687 as d from data_map_1.dm_project_data p where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0) e
  where e.d >= :week_end - 28 and e.d < :week_end
) x

Pitfalls:

  • Stage is the furthest milestone a project has a date for, so a project with a later date but a missing earlier one is placed by the later one.
  • Excludes holds, Canceled, Cancellation in Progress and Finalized (by today's status).

Project Closed → Plan Set: Weeks of Backlog

Weekly KPI Report row 29, Pipeline & Weeks of Capacity · owner Cody · target ≤ 1 weeks

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: "Project Closed → Plan Set" (Weekly KPI Report label); Engineering backlog; Closed to Plan Set weeks of capacity

Definition: Weeks of work between Project Closed and Plan Set: projects in the Closed or Scope Review stages at week end ÷ average weekly plan sets over the last four weeks.

SQL
select '29' as "row", s.n / nullif(x.n / 4.0, 0) as "value", s.n::numeric as "num",
  x.n / 4.0 as "den"
from (
  select count(*) as n
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Sales Hold', 'On Hold', 'Legal Hold'))
    and p.osc_660 < :week_end and (p.osc_676 is null or p.osc_676 >= :week_end)
    and case
    when p.osc_675 < :week_end then 675 when p.osc_674 < :week_end then 674
    when p.osc_671 < :week_end then 671 when p.osc_669 < :week_end then 669
    when p.osc_667 < :week_end then 667 when p.osc_666 < :week_end then 666
    when p.osc_664 < :week_end then 664 when p.osc_662 < :week_end then 662
    when p.osc_661 < :week_end then 661 when p.osc_687 < :week_end then 687
    else 660 end in (687, 661)
) s
cross join (
  select count(*) as n
  from (select p.osc_662 as d from data_map_1.dm_project_data p where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0) e
  where e.d >= :week_end - 28 and e.d < :week_end
) x

Pitfalls:

  • Same stage and status caveats as row 28.

Permitting (Plan Set → RTS): Weeks of Backlog

Weekly KPI Report row 30, Pipeline & Weeks of Capacity · owner Allie · target ≤ 3 weeks

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: "Permitting (Plan Set → RTS)" (Weekly KPI Report label); Permitting backlog; permitting weeks of capacity

Definition: Weeks of work between Plan Set and Ready to Schedule: projects in the Plan Set, Permit Submitted or Permits Approved stages ÷ average weekly RTS over the last four weeks.

SQL
select '30' as "row", s.n / nullif(x.n / 4.0, 0) as "value", s.n::numeric as "num",
  x.n / 4.0 as "den"
from (
  select count(*) as n
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Sales Hold', 'On Hold', 'Legal Hold'))
    and p.osc_660 < :week_end and (p.osc_676 is null or p.osc_676 >= :week_end)
    and case
    when p.osc_675 < :week_end then 675 when p.osc_674 < :week_end then 674
    when p.osc_671 < :week_end then 671 when p.osc_669 < :week_end then 669
    when p.osc_667 < :week_end then 667 when p.osc_666 < :week_end then 666
    when p.osc_664 < :week_end then 664 when p.osc_662 < :week_end then 662
    when p.osc_661 < :week_end then 661 when p.osc_687 < :week_end then 687
    else 660 end in (662, 664, 666)
) s
cross join (
  select count(*) as n
  from (select p.osc_667 as d from data_map_1.dm_project_data p where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0) e
  where e.d >= :week_end - 28 and e.d < :week_end
) x

Pitfalls:

  • Same stage and status caveats as row 28.

RTS → Install Started: Weeks of Backlog

Weekly KPI Report row 31, Pipeline & Weeks of Capacity · owner Brian · target 2 to 4 weeks

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: "RTS → Install Started" (Weekly KPI Report label); Install backlog; RTS weeks of capacity

Definition: Weeks of work between RTS and Install Started: projects in the RTS stage ÷ average weekly installs started over the last four weeks.

SQL
select '31' as "row", s.n / nullif(x.n / 4.0, 0) as "value", s.n::numeric as "num",
  x.n / 4.0 as "den"
from (
  select count(*) as n
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Sales Hold', 'On Hold', 'Legal Hold'))
    and p.osc_660 < :week_end and (p.osc_676 is null or p.osc_676 >= :week_end)
    and case
    when p.osc_675 < :week_end then 675 when p.osc_674 < :week_end then 674
    when p.osc_671 < :week_end then 671 when p.osc_669 < :week_end then 669
    when p.osc_667 < :week_end then 667 when p.osc_666 < :week_end then 666
    when p.osc_664 < :week_end then 664 when p.osc_662 < :week_end then 662
    when p.osc_661 < :week_end then 661 when p.osc_687 < :week_end then 687
    else 660 end in (667)
) s
cross join (
  select count(*) as n
  from (select p.osc_669 as d from data_map_1.dm_project_data p where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0) e
  where e.d >= :week_end - 28 and e.d < :week_end
) x

Pitfalls:

  • Target is a range (2 to 4 weeks): too low means crews may run out of work.

Install Started → Verified: Weeks of Backlog

Weekly KPI Report row 32, Pipeline & Weeks of Capacity · owner Brian · target ≤ 1 weeks

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: "Install Started → Verified" (Weekly KPI Report label); Install in progress; started-not-verified

Definition: Weeks of work between Install Started and Install Verified.

SQL
select '32' as "row", s.n / nullif(x.n / 4.0, 0) as "value", s.n::numeric as "num",
  x.n / 4.0 as "den"
from (
  select count(*) as n
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Sales Hold', 'On Hold', 'Legal Hold'))
    and p.osc_660 < :week_end and (p.osc_676 is null or p.osc_676 >= :week_end)
    and case
    when p.osc_675 < :week_end then 675 when p.osc_674 < :week_end then 674
    when p.osc_671 < :week_end then 671 when p.osc_669 < :week_end then 669
    when p.osc_667 < :week_end then 667 when p.osc_666 < :week_end then 666
    when p.osc_664 < :week_end then 664 when p.osc_662 < :week_end then 662
    when p.osc_661 < :week_end then 661 when p.osc_687 < :week_end then 687
    else 660 end in (669)
) s
cross join (
  select count(*) as n
  from (select p.osc_671 as d from data_map_1.dm_project_data p where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0) e
  where e.d >= :week_end - 28 and e.d < :week_end
) x

Pitfalls:

  • Install Started keeps the first visit's date, so a job waiting on a return visit stays in this stage until it's verified.

Install Verified → Inspection Passed: Weeks of Backlog

Weekly KPI Report row 33, Pipeline & Weeks of Capacity · owner Zac · target ≤ 2 weeks

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: "Install Verified → Inspection Passed" (Weekly KPI Report label); Inspection backlog weeks

Definition: Weeks of work between Install Verified and Inspection Passed, for projects sold 2025 on.

SQL
select '33' as "row", s.n / nullif(x.n / 4.0, 0) as "value", s.n::numeric as "num",
  x.n / 4.0 as "den"
from (
  select count(*) as n
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Sales Hold', 'On Hold', 'Legal Hold'))
    and p.osc_660 < :week_end and (p.osc_676 is null or p.osc_676 >= :week_end)
    and p.osc_660 >= date '2025-01-01'
    and case
    when p.osc_675 < :week_end then 675 when p.osc_674 < :week_end then 674
    when p.osc_671 < :week_end then 671 when p.osc_669 < :week_end then 669
    when p.osc_667 < :week_end then 667 when p.osc_666 < :week_end then 666
    when p.osc_664 < :week_end then 664 when p.osc_662 < :week_end then 662
    when p.osc_661 < :week_end then 661 when p.osc_687 < :week_end then 687
    else 660 end in (671)
) s
cross join (
  select count(*) as n
  from (select coalesce(p.osc_674, (
    select min(e.start_time)::date
    from data_map_1.dm_ev_42_data e
    join phoenix.object_status es on es.id = e.object_status_id
    where e.project_id = p.project_id and e.archived = false
      and es.object_status = 'Inspection Passed'
  )) as d from data_map_1.dm_project_data p where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0) e
  where e.d >= :week_end - 28 and e.d < :week_end
) x

Pitfalls:

  • Only projects sold from 2025-01-01, to skip old data.

Inspection Passed → PTO Approved: Weeks of Backlog

Weekly KPI Report row 34, Pipeline & Weeks of Capacity · owner Allie · target ≤ 2 weeks

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: "Inspection Passed → PTO Approved" (Weekly KPI Report label); PTO backlog weeks

Definition: Weeks of work between Inspection Passed and PTO Approved (including PTO Submitted), for projects sold 2025 on.

SQL
select '34' as "row", s.n / nullif(x.n / 4.0, 0) as "value", s.n::numeric as "num",
  x.n / 4.0 as "den"
from (
  select count(*) as n
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Sales Hold', 'On Hold', 'Legal Hold'))
    and p.osc_660 < :week_end and (p.osc_676 is null or p.osc_676 >= :week_end)
    and p.osc_660 >= date '2025-01-01'
    and case
    when p.osc_675 < :week_end then 675 when p.osc_674 < :week_end then 674
    when p.osc_671 < :week_end then 671 when p.osc_669 < :week_end then 669
    when p.osc_667 < :week_end then 667 when p.osc_666 < :week_end then 666
    when p.osc_664 < :week_end then 664 when p.osc_662 < :week_end then 662
    when p.osc_661 < :week_end then 661 when p.osc_687 < :week_end then 687
    else 660 end in (674, 675)
) s
cross join (
  select count(*) as n
  from (select p.osc_676 as d from data_map_1.dm_project_data p where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0) e
  where e.d >= :week_end - 28 and e.d < :week_end
) x

Pitfalls:

  • Same 2025 floor as row 33.

On Hold: Pre-install

Weekly KPI Report row 35a, Pipeline & Weeks of Capacity · owner Allie · target none (Declining)

Also called: Holds before install

Definition: Projects on Sales Hold, On Hold or Legal Hold that haven't been install verified, counted at the end of the week.

SQL
select '35a' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id in (select os.id from phoenix.object_status os where os.object_status in ('Sales Hold', 'On Hold', 'Legal Hold')) and p.osc_671 is null

Pitfalls:

  • Counted by status today, not at week end.

On Hold: Post-install

Weekly KPI Report row 35b, Pipeline & Weeks of Capacity · owner Nichole · target none (Declining)

Also called: Holds after install

Definition: Projects on Sales Hold, On Hold or Legal Hold that have been install verified.

SQL
select '35b' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id in (select os.id from phoenix.object_status os where os.object_status in ('Sales Hold', 'On Hold', 'Legal Hold')) and p.osc_671 is not null

Pitfalls:

  • Same as 35a.

Pipeline Coverage vs. Period Target

Weekly KPI Report row 36, Pipeline & Weeks of Capacity · owner Kalen · target ≥ 1.2

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Coverage; pipeline coverage

Definition: Active pre-install projects (rows 28 to 32's stage counts) ÷ the period's install goal.

SQL: (Row 28 + 29 + 30 + 31 + 32 stage counts, each query's num) ÷ the period's install goal.

Pitfalls:

  • Empty in a period with no install goal entered.
  • Uses the whole period's goal, not a weekly one: 1.2 means the pipeline holds 1.2 periods of installs.

Sold → Project Closed: Median Days

Weekly KPI Report row 37, Cycle Time (median days) · owner Charles · target ≤ 3 days

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: "Sold → Project Closed" (Weekly KPI Report label); Deal Review cycle time; sold to closed

Definition: Median calendar days from Sold to Project Closed, for projects closed during the week.

SQL
select '37' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (p.osc_687)::date - (p.osc_660)::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_687 >= :week_start and p.osc_687 < :week_end
) x
where x.d >= 0

Pitfalls:

  • Every cycle time in this section counts calendar days (weekends and holidays included); engineering reports count working days.
  • Measured on projects that finished the step this week, so a backlog clearing shows up as a jump in the median.
  • Includes waiting on NTP (see row 3).

Project Closed → Plan Set: Median Days

Weekly KPI Report row 38, Cycle Time (median days) · owner Brendan · target ≤ 5 days

Sale date: Closed (OSC 687), the day the project Sold.

Also called: "Project Closed → Plan Set" (Weekly KPI Report label); Engineering cycle time; closed to plan set

Definition: Median calendar days from Project Closed to Plan Set Created, for plan sets created during the week.

SQL
select '38' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (p.osc_662)::date - (p.osc_687)::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_662 >= :week_start and p.osc_662 < :week_end
) x
where x.d >= 0

Pitfalls:

  • Plan Set Created keeps the first plan set's date, so revisions don't change it.
  • Lumen's engineering turnaround measures block open to first QC close in working days, a different clock (Conflict 1).

Plan Set → RTS: Median Days

Weekly KPI Report row 39, Cycle Time (median days) · owner Allie · target ≤ 21 days

Also called: "Plan Set → RTS" (Weekly KPI Report label); Permitting cycle time; plan set to RTS

Definition: Median calendar days from Plan Set Created to Ready to Schedule, for projects that became RTS during the week.

SQL
select '39' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (p.osc_667)::date - (p.osc_662)::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_667 >= :week_start and p.osc_667 < :week_end
) x
where x.d >= 0

Pitfalls:

  • Both ends keep their first dates; revisions and re-RTS don't change them.

NEM Submitted → NEM Approved: Median Days

Weekly KPI Report row 39a, Cycle Time (median days) · owner Carson · target ≤ 7 days

Also called: "NEM Submitted → NEM Approved" (Weekly KPI Report label); NEM cycle time

Definition: Median calendar days from NEM Submitted to NEM Approved, for approvals during the week.

SQL
select '39a' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (p.osc_1117)::date - (p.osc_1116)::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_1117 >= :week_start and p.osc_1117 < :week_end
) x
where x.d >= 0

Pitfalls:

  • Both fields keep their first dates, so a resubmission doesn't reset the start.

Permit Submitted → Approved: Median Days

Weekly KPI Report row 40, Cycle Time (median days) · owner Natalie · target ≤ 14 days

Also called: "Permit Submitted → Approved" (Weekly KPI Report label); Permit cycle time; permit turnaround

Definition: Median calendar days from Permit Submitted to All Permits Approved, for approvals during the week.

SQL
select '40' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (p.osc_666)::date - (p.osc_664)::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_666 >= :week_start and p.osc_666 < :week_end
) x
where x.d >= 0

Pitfalls:

  • Both ends keep their first dates.

RTS → Installation First Scheduled: Median Days

Weekly KPI Report row 40a, Cycle Time (median days) · owner Christina · target ≤ 5 days

Also called: "RTS → Installation First Scheduled" (Weekly KPI Report label); Time to schedule; RTS to scheduled

Definition: Median calendar days from Ready to Schedule to the install first being scheduled, for projects scheduled during the week.

SQL
select '40a' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (p.osc_668)::date - (p.osc_667)::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_668 >= :week_start and p.osc_668 < :week_end
) x
where x.d >= 0

Pitfalls:

  • Installation First Scheduled (OSC 668) keeps the first booking, so this is RTS to the first time the install was scheduled; reschedules don't count.

RTS → Install Started: Median Days

Weekly KPI Report row 41, Cycle Time (median days) · owner Brian · target ≤ 21 days

Also called: "RTS → Install Started" (Weekly KPI Report label); RTS to install

Definition: Median calendar days from Ready to Schedule to Install Started, for installs started during the week.

SQL
select '41' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (p.osc_669)::date - (p.osc_667)::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_669 >= :week_start and p.osc_669 < :week_end
) x
where x.d >= 0

Pitfalls:

  • Install Started is the first visit; return visits don't change it.

Install Started → Verified: 75th Percentile Days

Weekly KPI Report row 42, Cycle Time (median days) · owner Brian · target ≤ 3 days

Also called: "Install Started → Verified (P75)" (Weekly KPI Report label); Install duration (P75)

Definition: The 75th percentile (not the median) of calendar days from Install Started to Install Verified, for installs verified during the week.

SQL
select '42' as "row", percentile_cont(0.75) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (p.osc_671)::date - (p.osc_669)::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_671 >= :week_start and p.osc_671 < :week_end
) x
where x.d >= 0

Pitfalls:

  • The only cycle time here that isn't a median.
  • Install Started is the first visit, so a job that needs a return visit counts the whole span to verification.

Ready for M1 Funding → M1 Submitted: Median Days

Weekly KPI Report row 42a, Cycle Time (median days) · owner Colton · target < 7 days

Also called: "Ready for M1 Funding → M1 Submitted" (Weekly KPI Report label); M1 prep time; ready to M1 submitted

Definition: Median calendar days from Ready for M1 Funding to M1 Submitted, for M1s submitted during the week.

SQL
select '42a' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (coalesce(p.osc_681, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1939)))::date - (greatest((select max(x.osc_1113) from data_map_1.dm_pb_11_data x where x.project_id = p.project_id and x.archived = false), (select max(y.osc_4510) from data_map_1.dm_pb_14_data y where y.project_id = p.project_id and y.archived = false)))::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and coalesce(p.osc_681, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1939)) >= :week_start and coalesce(p.osc_681, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1939)) < :week_end
) x
where x.d >= 0

Pitfalls:

  • Ready for M1 Funding is the later of the Installation block's date (OSC 1113) and the ESC block's date (OSC 4510).
  • Cash deals use the M1 invoice sent date.

Install Verified → M1 Approved: Median Days

Weekly KPI Report row 42b, Cycle Time (median days) · owner Colton · target < 14 days
Weekly KPI Report row 66, Funding · owner Colton · target < 14 days

Also called: "Install Verified → M1 Approved" (Weekly KPI Report label); "Install Verified → M1 Approved (days)" (Weekly KPI Report label); Install to M1

Definition: Median calendar days from Install Verified to M1 Approved, for M1 approvals during the week.

SQL
select '42b' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (coalesce(p.osc_682, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1940)))::date - (p.osc_671)::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and coalesce(p.osc_682, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1940)) >= :week_start and coalesce(p.osc_682, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1940)) < :week_end
) x
where x.d >= 0

Pitfalls: None beyond the report's rules.

Install Verified → Inspection Passed: Median Days

Weekly KPI Report row 43, Cycle Time (median days) · owner Zac · target ≤ 14 days

Also called: "Install Verified → Inspection Passed" (Weekly KPI Report label); Install to inspection

Definition: Median calendar days from Install Verified to Inspection Passed, for inspections passed during the week.

SQL
select '43' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (p.osc_674)::date - (p.osc_671)::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_674 >= :week_start and p.osc_674 < :week_end
) x
where x.d >= 0

Pitfalls: None beyond the report's rules.

Inspection Passed → PTO Approved: Median Days

Weekly KPI Report row 44, Cycle Time (median days) · owner Allie · target ≤ 10 days

Also called: "Inspection Passed → PTO Approved" (Weekly KPI Report label); Inspection to PTO

Definition: Median calendar days from Inspection Passed to PTO Approved, for PTOs approved during the week.

SQL
select '44' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (p.osc_676)::date - (p.osc_674)::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_676 >= :week_start and p.osc_676 < :week_end
) x
where x.d >= 0

Pitfalls: None beyond the report's rules.

Sold → Install Verified: Median Days

Weekly KPI Report row 45, Cycle Time (median days) · owner Kalen · target ≤ 60 days

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: "Sold → Install Verified" (Weekly KPI Report label); Sold to install; sales to IV

Definition: Median calendar days from Sold to Install Verified, for installs verified during the week.

SQL
select '45' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (p.osc_671)::date - (p.osc_660)::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_671 >= :week_start and p.osc_671 < :week_end
) x
where x.d >= 0

Pitfalls:

  • Calendar days and a median; other reports use averages or working days (Conflict 33).

Install Verified → PTO Approved: Median Days

Weekly KPI Report row 46, Cycle Time (median days) · owner Kalen · target ≤ 30 days

Also called: "Install Verified → PTO Approved" (Weekly KPI Report label); Install to PTO

Definition: Median calendar days from Install Verified to PTO Approved, for PTOs approved during the week.

SQL
select '46' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (p.osc_676)::date - (p.osc_671)::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_676 >= :week_start and p.osc_676 < :week_end
) x
where x.d >= 0

Pitfalls:

  • Some QuickSight "install to PTO" KPIs actually read funding dates (Conflict 35).

Installs Scheduled (projects)

Weekly KPI Report row 47, Install Execution · owner Christina · target ≥ weekly install goal ÷ 0.71

Also called: Installs scheduled

Definition: Residential solar projects with an install appointment starting during the week.

SQL
select '47' as "row", count(distinct e.project_id) as "value", null::numeric as "num",
  null::numeric as "den"
from data_map_1.dm_ev_41_data e
join data_map_1.dm_project_data p on p.project_id = e.project_id
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and e.archived = false and e.start_time >= :week_start and e.start_time < :week_end

Pitfalls:

  • Counts projects, not appointments, and includes appointments later called off or canceled.
  • Ops Leaderboards counts appointments by the day they were booked instead.

Scheduled → Verified Conversion %

Weekly KPI Report row 48, Install Execution · owner Brian · target ≥ 75%

Also called: Schedule conversion

Definition: Of projects with an install appointment during the week, the share install verified within 14 days of their first appointment that week.

SQL
select '48' as "row", x.conv::numeric / nullif(x.projs, 0) as "value",
  x.conv::numeric as "num", x.projs::numeric as "den"
from (
  select count(*) as projs,
    sum(case when a.iv >= a.first_appt and a.iv < a.first_appt + 15 then 1 else 0 end) as conv
  from (
    select e.project_id, min(e.start_time)::date as first_appt, min(p.osc_671)::date as iv
    from data_map_1.dm_ev_41_data e
    join data_map_1.dm_project_data p on p.project_id = e.project_id
    where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and e.archived = false and e.start_time >= :week_start and e.start_time < :week_end
    group by e.project_id
  ) a
) x

Pitfalls:

  • The Monday run saves this before 14 days have passed for most of the week's appointments, so the saved figure only sees installs verified by that Monday. A rerun later will come out higher.

Appointments per Install Verified

Weekly KPI Report row 49, Install Execution · owner Brian · target ≤ 1.5

Also called: Trips per install

Definition: Install appointments starting in the week ÷ installs verified in the week (row 10).

SQL
select '49' as "row", a.n::numeric / nullif(i.n, 0) as "value", a.n::numeric as "num",
  i.n::numeric as "den"
from (
  select count(*) as n
  from data_map_1.dm_ev_41_data e
  join data_map_1.dm_project_data p on p.project_id = e.project_id
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and e.archived = false and e.start_time >= :week_start and e.start_time < :week_end
) a
cross join (
  select count(*) as n
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.osc_671 >= :week_start and p.osc_671 < :week_end
) i

Pitfalls:

  • The top and bottom are different projects, so a busy scheduling week with few completions inflates it.

Called Off / Canceled / No Show %

Weekly KPI Report row 50, Install Execution · owner Brian · target ≤ 8%

Also called: Install appointment fallout

Definition: Of install appointments starting in the week, the share now Called Off, Canceled or No Show.

SQL
select '50' as "row", x.off::numeric / nullif(x.n, 0) as "value", x.off::numeric as "num",
  x.n::numeric as "den"
from (
  select count(*) as n,
    sum(case when es.object_status in ('Called Off', 'Canceled', 'No Show') then 1 else 0 end) as off
  from data_map_1.dm_ev_41_data e
  join phoenix.object_status es on es.id = e.object_status_id
  join data_map_1.dm_project_data p on p.project_id = e.project_id
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and e.archived = false and e.start_time >= :week_start and e.start_time < :week_end
) x

Pitfalls:

  • Uses each appointment's status at the time the query runs.

Material Delivery → M1 Submitted: Median Days

Weekly KPI Report row 50a, Install Execution · owner Brian · target ≤ 10 days

Also called: "Material Delivery → M1 Submitted (median days)" (Weekly KPI Report label); Material to M1

Definition: Median calendar days from material delivery to M1 Submitted, for M1s submitted during the week.

SQL
select '50a' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (coalesce(p.osc_681, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1939)))::date - ((
      select e.osc_1167::date
      from data_map_1.dm_ev_41_data e
      where e.project_id = p.project_id and e.archived = false and e.osc_1167 is not null
      order by e.start_time, e.project_process_block_event_id
      limit 1
    ))::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and coalesce(p.osc_681, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1939)) >= :week_start and coalesce(p.osc_681, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1939)) < :week_end
) x
where x.d >= 0

Pitfalls:

  • From March 2026 only.

Install First-Pass Rate

Weekly KPI Report row 51, Install Execution · owner Brian · target ≥ 75%

Also called: First-time install completion

Definition: Of each project's first install attempt in the week, the share the field audit marked Work Complete.

SQL
select '51' as "row", x.pass::numeric / nullif(x.audited, 0) as "value", x.pass::numeric as "num",
  x.audited::numeric as "den"
from (
  select sum(case when a.attempt_seq = 1 and a.fa = 304 then 1 else 0 end) as pass,
    sum(case when a.attempt_seq = 1 and a.fa in (304, 305) then 1 else 0 end) as audited
  from (
    select e.project_id, e.start_time, e.osc_639 as fa,
      case when e.osc_639 is distinct from 1697 then
        row_number() over (partition by e.project_id, (e.osc_639 is distinct from 1697)
          order by e.start_time, e.project_process_block_event_id)
      end as attempt_seq
    from data_map_1.dm_ev_41_data e
    join data_map_1.dm_project_data p on p.project_id = e.project_id
    where e.object_status_id != 12 and p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  ) a
  where a.start_time >= :week_start and a.start_time < :week_end
) x

Pitfalls:

  • Appointments with a Rescheduled / Canceled audit result are skipped, so the first real attempt is used.
  • Only attempts audited Complete or Incomplete count; unaudited ones are left out.
  • Three versions of this metric exist across reports (Conflict 37).

Ready for M1 Funding, Then M1 Rejected

Weekly KPI Report row 51a, Install Execution · owner Zac · target none (Decreasing)

Also called: M1 rejected after ready

Definition: Projects with an M1 rejection during the week that had already been marked Ready for M1 Funding.

SQL
select '51a' as "row", count(distinct m.project_id) as "value", null::numeric as "num",
  null::numeric as "den"
from data_map_1.dm_pb_26_data m
join data_map_1.dm_project_data p on p.project_id = m.project_id
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and m.osc_1468 >= :week_start and m.osc_1468 < :week_end
  and greatest((select max(x.osc_1113) from data_map_1.dm_pb_11_data x where x.project_id = p.project_id and x.archived = false), (select max(y.osc_4510) from data_map_1.dm_pb_14_data y where y.project_id = p.project_id and y.archived = false)) <= m.osc_1468

Pitfalls:

  • Nearly every rejection qualifies (99% in Q3), so this tracks total M1 rejections closely.

Correction Work per 100 Installs

Weekly KPI Report row 52, Install Execution · owner Brian · target ≤ 40

Also called: Correction rate; CW per 100

Definition: Correction Work blocks created during the week (not canceled) per 100 installs verified that week.

SQL
select '52' as "row", 100.0 * c.n / nullif(i.n, 0) as "value", 100.0 * c.n as "num",
  i.n::numeric as "den"
from (
  select count(*) as n
  from phoenix.project_process_block b
  join phoenix.object_status bs on bs.id = b.object_status_id
  join data_map_1.dm_project_data p on p.project_id = b.project_id
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and b.process_block_id = 15 and b.archived = false
    and bs.object_status != 'Canceled'
    and b.date_created >= :week_start and b.date_created < :week_end
) c
cross join (
  select count(*) as n
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.osc_671 >= :week_start and p.osc_671 < :week_end
) i

Pitfalls:

  • The corrections and installs are different projects in the same week.

Open Correction Work > 14 days

Weekly KPI Report row 52c, Install Execution · owner Brian · target ≤ 25

Also called: Aged correction work

Definition: Correction Work blocks open (not Complete or Canceled) and created more than 14 days before the end of the week.

SQL
select '52c' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from phoenix.project_process_block b
join phoenix.object_status bs on bs.id = b.object_status_id
join data_map_1.dm_project_data p on p.project_id = b.project_id
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and b.process_block_id = 15 and b.archived = false
  and bs.object_status not in ('Complete', 'Canceled')
  and b.date_created < :week_end - 14

Pitfalls:

  • Counted by status today.

Field Audit Completion %

Weekly KPI Report row 53, Install Execution · owner Zac · target ≥ 95%

Also called: Field audit rate

Definition: Of the week's installs verified, the share with Field Audit Completed By filled in.

SQL
select '53' as "row", x.fa::numeric / nullif(x.n, 0) as "value", x.fa::numeric as "num",
  x.n::numeric as "den"
from (
  select count(*) as n,
    sum(case when exists (
      select 1 from data_map_1.dm_pb_11_data i
      where i.project_id = p.project_id and i.archived = false and i.osc_1843 is not null
    ) then 1 else 0 end) as fa
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.osc_671 >= :week_start and p.osc_671 < :week_end
) x

Pitfalls:

  • Checks only that the name is filled, not the audit result.

As-Builts Sent Back to Engineering

Weekly KPI Report row 54, Install Execution · owner Cody · target none (Track)

Also called: As-builts; as-built revisions

Definition: Projects whose as-built scope review sent the job back to Engineering for revised plans during the week.

SQL
select '54' as "row", count(distinct ch.project_id) as "value", null::numeric as "num",
  null::numeric as "den"
from phoenix.control_history ch
join data_map_1.dm_project_data p on p.project_id = ch.project_id
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and ch.control_id = 302
  and ch.date_created >= :week_start and ch.date_created < :week_end
  and exists (
    select 1 from data_map_1.dm_pb_5_data s
    where s.project_id = p.project_id and s.archived = false and s.osc_2573 = 1300
  )

Pitfalls:

  • Read from the history of control 302 "Needs Revised Plans (auto)"; the As-Built flag has been used since mid-March 2026.
  • The reason field is rarely filled in.

As-Builts as % of Install Verified

Weekly KPI Report row 54a, Install Execution · owner Cody · target ≤ 5%

Also called: As-built rate

Definition: As-builts sent back (row 54) ÷ installs verified (row 10) in the same week.

SQL: Row 54 ÷ row 10 for the same week.

Pitfalls:

  • The as-builts aren't necessarily the same projects as that week's installs. Lumen's As-Built Rate uses a different base (Conflict 24).

M1 Submitted

Weekly KPI Report row 55, Funding · owner Colton · target flow target from row 10 and row 62

Also called: M1 submissions

Definition: Residential solar projects whose M1 funding was submitted during the week (cash deals: M1 invoice sent).

SQL
select '55' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and coalesce(p.osc_681, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1939)) >= :week_start and coalesce(p.osc_681, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1939)) < :week_end

Pitfalls:

  • A rejection appears to clear the project-level date, which can drop projects from past weeks on a rerun (not yet confirmed).

M1 First-Pass Approval %

Weekly KPI Report row 56, Funding · owner Colton · target ≥ 75%

Also called: M1 internal pass rate; funding team pass rate

Definition: M1s submitted ÷ (M1s submitted + M1 rejections charged to the Funding Team), in the week.

SQL
select '56' as "row", s.n::numeric / nullif(s.n + r.n, 0) as "value", s.n::numeric as "num",
  (s.n + r.n)::numeric as "den"
from (
  select count(*) as n
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and coalesce(p.osc_681, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1939)) >= :week_start
    and coalesce(p.osc_681, (select min(coalesce(ce.date_value, ce.timestamp_value::date)) from phoenix.project_process_block_component_entry ce join phoenix.project_process_block cb on cb.id = ce.project_process_block_id where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false and ce.archived = false and ce.object_section_component_id = 1939)) < :week_end
) s
cross join (
  select count(*) as n
  from data_map_1.dm_pb_26_data m
  join data_map_1.dm_project_data p on p.project_id = m.project_id
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and m.osc_1468 >= :week_start and m.osc_1468 < :week_end
    and (select lv.list_value from phoenix.list_value lv where lv.id = m.osc_1762) = 'Funding Team'
) r

Pitfalls:

  • Despite the name, it doesn't follow each project's first submission: it compares the week's submissions with the week's Funding Team rejections, which are different projects.
  • Financier rejections are row 56a.

M1 First-Pass Approval % (Financier)

Weekly KPI Report row 56a, Funding · owner Colton · target ≥ 90%

Also called: M1 financier pass rate

Definition: Of each project's first M1 funding block that got a financier decision during the week, the share approved.

SQL
select '56a' as "row", x.appr::numeric / nullif(x.n, 0) as "value", x.appr::numeric as "num",
  x.n::numeric as "den"
from (
  select count(*) as n, sum(case when f.approved then 1 else 0 end) as appr
  from (
    select distinct on (m.project_id) m.project_id, m.osc_1161 is not null as approved,
      coalesce(m.osc_1161, m.osc_1468) as outcome
    from data_map_1.dm_pb_26_data m
    join data_map_1.dm_project_data p on p.project_id = m.project_id
    where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
      and (m.osc_1161 is not null or (m.osc_1468 is not null
        and (select lv.list_value from phoenix.list_value lv where lv.id = m.osc_1762) = 'Financier'))
    order by m.project_id, m.date_created, m.project_process_block_id
  ) f
  where f.outcome >= :week_start and f.outcome < :week_end
) x

Pitfalls:

  • Only financier rejections count against it; internal ones are row 56.

M1 Rejections: Install Crew-attributed

Weekly KPI Report row 57, Funding · owner Brian · target none (Decreasing)

Also called: Crew-caused M1 rejections

Definition: Projects with an M1 rejection during the week charged to the Install Crew (or Installers).

SQL
select '57' as "row", count(distinct m.project_id) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_pb_26_data m
join data_map_1.dm_project_data p on p.project_id = m.project_id
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and m.archived = false and m.osc_1468 >= :week_start and m.osc_1468 < :week_end
  and (exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Install Crew%' and ',' || trim(both '{}' from cast(m.osc_1469 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%') or exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Installers' and ',' || trim(both '{}' from cast(m.osc_1469 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%'))

Pitfalls:

  • Can overlap 57a: one rejection can be charged to both.

M1 Rejections: Field Audit-attributed

Weekly KPI Report row 57a, Funding · owner Zac · target none (Decreasing)

Also called: Field audit M1 rejections

Definition: Projects with an M1 rejection during the week charged to Field Audit.

SQL
select '57a' as "row", count(distinct m.project_id) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_pb_26_data m
join data_map_1.dm_project_data p on p.project_id = m.project_id
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and m.archived = false and m.osc_1468 >= :week_start and m.osc_1468 < :week_end
  and exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Field Audit%' and ',' || trim(both '{}' from cast(m.osc_1469 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%')

Pitfalls:

  • Can overlap 57.

M1 Rejections: Funding Agent-attributed

Weekly KPI Report row 58, Funding · owner Colton · target ≤ 5

Also called: Funding agent M1 rejections

Definition: Projects with an M1 rejection during the week charged to the Funding Agent.

SQL
select '58' as "row", count(distinct m.project_id) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_pb_26_data m
join data_map_1.dm_project_data p on p.project_id = m.project_id
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and m.archived = false and m.osc_1468 >= :week_start and m.osc_1468 < :week_end
  and exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Funding Agent%' and ',' || trim(both '{}' from cast(m.osc_1469 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%')

Pitfalls: None beyond the report's rules.

M2 Submitted

Weekly KPI Report row 59, Funding · owner Colton · target flow target from row 14 and row 64a

Also called: M2 submissions

Definition: Residential solar projects whose M2 funding was submitted during the week (OSC 684).

SQL
select '59' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.osc_684 >= :week_start and p.osc_684 < :week_end

Pitfalls:

  • No cash fallback: cash deals collect at M0 and M1.

M2 First-Pass Approval %

Weekly KPI Report row 60, Funding · owner Colton · target ≥ 85%

Also called: M2 internal pass rate

Definition: Each project's first M2 block: those submitted this week ÷ (those + first-block rejections charged to the Funding Team this week).

SQL
select '60' as "row", x.sub::numeric / nullif(x.sub + x.ft, 0) as "value", x.sub::numeric as "num",
  (x.sub + x.ft)::numeric as "den"
from (
  select
    sum(case when f.osc_1256 >= :week_start and f.osc_1256 < :week_end then 1 else 0 end) as sub,
    sum(case when f.osc_1533 >= :week_start and f.osc_1533 < :week_end and f.by_team then 1 else 0 end) as ft
  from (
    select distinct on (m.project_id) m.osc_1256, m.osc_1533,
      (select lv.list_value from phoenix.list_value lv where lv.id = m.osc_1763) = 'Funding Team'
        as by_team
    from data_map_1.dm_pb_27_data m
    join data_map_1.dm_project_data p on p.project_id = m.project_id
    where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and m.archived = false
    order by m.project_id, m.date_created, m.project_process_block_id
  ) f
) x

Pitfalls:

  • Submissions and rejections are counted in their own weeks, so the top and bottom are different projects.

M2 First-Pass Approval % (Financier)

Weekly KPI Report row 60a, Funding · owner Colton · target ≥ 90%

Also called: M2 financier pass rate

Definition: Of each project's first M2 block that got a financier decision during the week, the share approved.

SQL
select '60a' as "row", x.appr::numeric / nullif(x.n, 0) as "value", x.appr::numeric as "num",
  x.n::numeric as "den"
from (
  select count(*) as n, sum(case when f.osc_1257 is not null then 1 else 0 end) as appr
  from (
    select distinct on (m.project_id) m.osc_1257, m.osc_1533,
      (select lv.list_value from phoenix.list_value lv where lv.id = m.osc_1763) = 'Financier'
        as by_financier
    from data_map_1.dm_pb_27_data m
    join data_map_1.dm_project_data p on p.project_id = m.project_id
    where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and m.archived = false
    order by m.project_id, m.date_created, m.project_process_block_id
  ) f
  where (f.osc_1257 is not null or (f.osc_1533 is not null and f.by_financier))
    and coalesce(f.osc_1257, f.osc_1533) >= :week_start and coalesce(f.osc_1257, f.osc_1533) < :week_end
) x

Pitfalls: None beyond the report's rules.

M2 Rejections: Commissioning / Monitoring

Weekly KPI Report row 61, Funding · owner Brian · target ≤ 3

Also called: M2 monitoring rejections

Definition: Projects with an M2 rejection during the week for a commissioning or monitoring reason.

SQL
select '61' as "row", count(distinct m.project_id) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_pb_27_data m
join data_map_1.dm_project_data p on p.project_id = m.project_id
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and m.archived = false and m.osc_1533 >= :week_start and m.osc_1533 < :week_end
  and (exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Commissioning / Provisioning Issues' and ',' || trim(both '{}' from cast(m.osc_1259 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%') or exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Gateway not Reporting' and ',' || trim(both '{}' from cast(m.osc_1259 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%') or exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Micros not Reporting' and ',' || trim(both '{}' from cast(m.osc_1259 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%') or exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Monitoring Issue' and ',' || trim(both '{}' from cast(m.osc_1259 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%') or exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'CTs - Negative Consumption' and ',' || trim(both '{}' from cast(m.osc_1259 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%'))

Pitfalls:

  • Counts five reasons: Commissioning / Provisioning Issues, Gateway not Reporting, Micros not Reporting, Monitoring Issue, CTs - Negative Consumption. Monitoring Ownership is not included.

Installed, M1 Not Started > 14 days

Weekly KPI Report row 62, Funding · owner Colton · target ≤ 10

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: M1 not started

Definition: Active projects (sold 2025 on, not cash) install verified more than 14 days before week end with no M1 submitted or approved.

SQL
select '62' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.osc_660 >= date '2025-01-01' and not exists (select 1 from phoenix.project_process_block cb where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false)
  and p.osc_671 < :week_end - 14
  and (p.osc_681 is null or p.osc_681 >= :week_end)
  and (p.osc_682 is null or p.osc_682 >= :week_end)
  and not exists (
    select 1 from data_map_1.dm_pb_26_data m
    where m.project_id = p.project_id and m.osc_1160 < :week_end
  )

Pitfalls: None beyond the report's rules.

M1 Pending Approval > 14 days

Weekly KPI Report row 63, Funding · owner Colton · target ≤ 10

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Aged M1 pending

Definition: Projects (sold 2025 on) whose latest M1 block has been Pending Approval for 14 days or more at week end.

SQL
select '63' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from (
  select distinct on (b.project_id) b.id, b.object_status_id
  from phoenix.project_process_block b
  join data_map_1.dm_project_data p on p.project_id = b.project_id
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.osc_660 >= date '2025-01-01' and b.process_block_id = 26 and b.archived = false
  order by b.project_id, b.date_created desc, b.id desc
) l
join phoenix.object_status ls on ls.id = l.object_status_id
where ls.object_status = 'Pending Approval'
  and (
    select max(a.changed_at) from phoenix.project_process_block_audit a
    where a.project_process_block_id = l.id and a.object_status_id = l.object_status_id
  ) <= :week_end - 14

Pitfalls:

  • Reads the block audit trail. It timed out (over 60 seconds) when run through Phoenix MCP on 2026-12-02; run it off-peak or for one week only.

M2 Stuck in Rejection > 14 days

Weekly KPI Report row 64, Funding · owner Colton · target ≤ 15

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: M2 stuck in rejection

Definition: Active projects (sold 2025 on) whose latest M2 block has been in Pending Correction Work, Resubmit or Funding Rejected for 14 days or more.

SQL
select '64' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from (
  select distinct on (b.project_id) b.id, b.object_status_id
  from phoenix.project_process_block b
  join data_map_1.dm_project_data p on p.project_id = b.project_id
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.osc_660 >= date '2025-01-01' and b.process_block_id = 27 and b.archived = false
  order by b.project_id, b.date_created desc, b.id desc
) l
join phoenix.object_status ls on ls.id = l.object_status_id
where ls.object_status in ('Pending Correction Work', 'Resubmit', 'Funding Rejected')
  and (
    select max(a.changed_at) from phoenix.project_process_block_audit a
    where a.project_process_block_id = l.id and a.object_status_id = l.object_status_id
  ) <= :week_end - 14

Pitfalls:

  • Reads the block audit trail; can be slow.

PTO Approved, No M2 Started

Weekly KPI Report row 64a, Funding · owner Colton · target 0

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: M2 not started

Definition: Active projects (sold 2025 on, not cash) with PTO approved, no M2 approved and no M2 funding block yet.

SQL
select '64a' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.osc_660 >= date '2025-01-01' and not exists (select 1 from phoenix.project_process_block cb where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false)
  and p.osc_676 < :week_end
  and (p.osc_685 is null or p.osc_685 >= :week_end)
  and not exists (
    select 1 from phoenix.project_process_block b
    where b.project_id = p.project_id and b.process_block_id = 27 and b.archived = false
      and b.date_created < :week_end
  )

Pitfalls:

  • 105 older projects (sold before 2025) also have no M2 block and are left out.

M2 Pending Approval > 14 days

Weekly KPI Report row 65, Funding · owner Colton · target ≤ 10

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Aged M2 pending

Definition: Active projects (sold 2025 on) whose latest M2 block has been Pending Approval for 14 days or more.

SQL
select '65' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from (
  select distinct on (b.project_id) b.id, b.object_status_id
  from phoenix.project_process_block b
  join data_map_1.dm_project_data p on p.project_id = b.project_id
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.osc_660 >= date '2025-01-01' and b.process_block_id = 27 and b.archived = false
  order by b.project_id, b.date_created desc, b.id desc
) l
join phoenix.object_status ls on ls.id = l.object_status_id
where ls.object_status = 'Pending Approval'
  and (
    select max(a.changed_at) from phoenix.project_process_block_audit a
    where a.project_process_block_id = l.id and a.object_status_id = l.object_status_id
  ) <= :week_end - 14

Pitfalls:

  • Reads the block audit trail; can be slow.

PTO Approved → M2 Approved: Median Days

Weekly KPI Report row 67, Funding · owner Colton · target ≤ 12 days

Also called: "PTO Approved → M2 Approved (days)" (Weekly KPI Report label); PTO to M2

Definition: Median calendar days from PTO Approved to M2 Approved, for M2 approvals during the week.

SQL
select '67' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select (p.osc_685)::date - (p.osc_676)::date as d
  from data_map_1.dm_project_data p
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and not exists (select 1 from phoenix.project_process_block cb where cb.project_id = p.project_id and cb.process_block_id = 32 and cb.archived = false)
    and p.osc_685 >= :week_start and p.osc_685 < :week_end
) x
where x.d >= 0

Pitfalls:

  • Cash deals are left out.

NEM First-Time Pass Rate (utility)

Weekly KPI Report row 67a, Pass Rates by Department · owner Carson · target ≥ 95%

Also called: NEM first-time pass

Definition: Of projects whose first NEM decision came during the week, the share approved the first time.

SQL
select '67a' as "row", x.passed::numeric / nullif(x.n, 0) as "value", x.passed::numeric as "num",
  x.n::numeric as "den"
from (
  select count(*) as n,
    sum(case when o.appr is not null and (o.rej is null or o.appr < o.rej) then 1 else 0 end) as passed
  from (
    select b.project_id,
      min(case when ce.object_section_component_id = 1206
        then coalesce(ce.date_value, ce.timestamp_value::date) end) as appr,
      min(case when ce.object_section_component_id in (1207, 3942)
        then coalesce(ce.date_value, ce.timestamp_value::date) end) as rej
    from phoenix.project_process_block b
    join phoenix.project_process_block_component_entry ce
      on ce.project_process_block_id = b.id and ce.archived = false
    join data_map_1.dm_project_data p on p.project_id = b.project_id
    where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and b.process_block_id = 18 and b.archived = false
      and ce.object_section_component_id in (1206, 1207, 3942)
    group by b.project_id
  ) o
  where least(o.appr, o.rej) >= :week_start and least(o.appr, o.rej) < :week_end
) x

Pitfalls:

  • Rejections include the Previous NEM Rejected Date (OSC 3942), so an earlier rejection that was overwritten still counts.
  • Lumen's Rejections report counts every NEM decision, not just the first (Conflict 20).

Permitting First-Time Pass Rate

Weekly KPI Report row 67b, Pass Rates by Department · owner Natalie · target ≥ 95%

Also called: Permit first-time pass

Definition: Of permit submissions whose first decision came during the week, the share approved with no rejection recorded.

SQL
select '67b' as "row", x.passed::numeric / nullif(x.n, 0) as "value", x.passed::numeric as "num",
  x.n::numeric as "den"
from (
  select count(*) as n,
    sum(case when e.osc_1511 is not null and e.osc_1512 is null
      and nullif(trim(both '{}' from cast(e.osc_513 as varchar)), '') is null
      then 1 else 0 end) as passed
  from data_map_1.dm_ev_40_data e
  join phoenix.object_status es on es.id = e.object_status_id
  join data_map_1.dm_project_data p on p.project_id = e.project_id
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and e.archived = false and es.object_status != 'Canceled'
    and least(e.osc_1511, e.osc_1512) >= :week_start and least(e.osc_1511, e.osc_1512) < :week_end
) x

Pitfalls:

  • From March 2026; earlier rejection data is unreliable.
  • Counts permit submissions, not projects: a project with three permits counts three times.

First-Time Inspection Pass Rate

Weekly KPI Report row 68, Pass Rates by Department · owner Brooke · target ≥ 85%

Also called: Inspection first-time pass

Definition: Of projects whose first final inspection happened during the week, the share that passed.

SQL
select '68' as "row", x.passed::numeric / nullif(x.n, 0) as "value", x.passed::numeric as "num",
  x.n::numeric as "den"
from (
  select count(*) as n, sum(case when f.status = 'Inspection Passed' then 1 else 0 end) as passed
  from (
    select distinct on (e.project_id) e.start_time, es.object_status as status
    from data_map_1.dm_ev_42_data e
    join phoenix.object_status es on es.id = e.object_status_id
    join data_map_1.dm_project_data p on p.project_id = e.project_id
    where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and e.archived = false
      and es.object_status in ('Inspection Passed', 'Inspection Failed')
    order by e.project_id, e.start_time, e.project_process_block_event_id
  ) f
  where f.start_time >= :week_start and f.start_time < :week_end
) x

Pitfalls:

  • Uses the appointment's start time and status.
  • Lumen's Rejections report counts all inspections, not first ones (Conflict 19).

Field-Attributable Pass Rate

Weekly KPI Report row 69, Pass Rates by Department · owner Brian · target ≥ 90%

Also called: Field-attributable pass rate

Definition: Of the week's final inspections, the share that didn't fail for a field reason (Field, Technician, Field Audit, ESC Electrician).

SQL
select '69' as "row", (x.n - x.failed)::numeric / nullif(x.n, 0) as "value",
  (x.n - x.failed)::numeric as "num", x.n::numeric as "den"
from (
  select count(*) as n,
    sum(case when es.object_status = 'Inspection Failed' and (
      exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Field' and ',' || trim(both '{}' from cast(e.osc_2349 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%') or exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Technician' and ',' || trim(both '{}' from cast(e.osc_2349 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%')
      or exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Field Audit' and ',' || trim(both '{}' from cast(e.osc_2349 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%') or exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'ESC Electrician' and ',' || trim(both '{}' from cast(e.osc_2349 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%')
    ) then 1 else 0 end) as failed
  from data_map_1.dm_ev_42_data e
  join phoenix.object_status es on es.id = e.object_status_id
  join data_map_1.dm_project_data p on p.project_id = e.project_id
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and e.archived = false
    and es.object_status in ('Inspection Passed', 'Inspection Failed')
    and e.start_time >= :week_start and e.start_time < :week_end
) x

Pitfalls:

  • Failures blamed on anyone else count as passes here, so this is always at least as high as the plain pass rate.

Inspections Not Failed by Ops %

Weekly KPI Report row 70, Pass Rates by Department · owner Zac · target ≥ 90%

Also called: Ops-attributable pass rate

Definition: Of the week's final inspections, the share that didn't fail for an ops reason (Inspection Scheduling Team, Permitting, Engineering, Site Survey).

SQL
select '70' as "row", (x.n - x.failed)::numeric / nullif(x.n, 0) as "value",
  (x.n - x.failed)::numeric as "num", x.n::numeric as "den"
from (
  select count(*) as n,
    sum(case when es.object_status = 'Inspection Failed' and (
      exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Inspection Scheduling Team' and ',' || trim(both '{}' from cast(e.osc_2349 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%') or exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Permitting' and ',' || trim(both '{}' from cast(e.osc_2349 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%')
      or exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Engineering' and ',' || trim(both '{}' from cast(e.osc_2349 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%') or exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Site Survey' and ',' || trim(both '{}' from cast(e.osc_2349 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%')
    ) then 1 else 0 end) as failed
  from data_map_1.dm_ev_42_data e
  join phoenix.object_status es on es.id = e.object_status_id
  join data_map_1.dm_project_data p on p.project_id = e.project_id
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and e.archived = false
    and es.object_status in ('Inspection Passed', 'Inspection Failed')
    and e.start_time >= :week_start and e.start_time < :week_end
) x

Pitfalls:

  • Engineering is inside the ops group here; Lumen's Engineering pass rate counts it separately (Conflict 23).

Install Verified → First Inspection: Median Days

Weekly KPI Report row 71, Pass Rates by Department · owner Zac · target ≤ 10 days

Also called: "Install Verified → First Inspection (days)" (Weekly KPI Report label); Install to first inspection

Definition: Median calendar days from Install Verified to the first final inspection appointment, for first inspections during the week.

SQL
select '71' as "row", percentile_cont(0.5) within group (order by x.d) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select f.first_insp::date - p.osc_671::date as d
  from (
    select e.project_id, min(e.start_time) as first_insp
    from data_map_1.dm_ev_42_data e
    where e.archived = false
    group by e.project_id
  ) f
  join data_map_1.dm_project_data p on p.project_id = f.project_id
  where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.osc_671 is not null
    and f.first_insp >= :week_start and f.first_insp < :week_end
) x
where x.d >= 0

Pitfalls: None beyond the report's rules.

Installed > 30 days, No Inspection Scheduled

Weekly KPI Report row 72, Pass Rates by Department · owner Zac · target ≤ 10

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Installed, no inspection

Definition: Active projects (sold 2025 on) install verified more than 30 days ago with no inspection passed and no inspection appointment created.

SQL
select '72' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_project_data p
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.osc_660 >= date '2025-01-01'
  and p.osc_671 < :week_end - 30
  and (p.osc_674 is null or p.osc_674 >= :week_end)
  and not exists (
    select 1 from data_map_1.dm_ev_42_data e
    where e.project_id = p.project_id and e.archived = false and e.date_created < :week_end
  )

Pitfalls: None beyond the report's rules.

Projects with 2+ Failed Inspections

Weekly KPI Report row 73, Pass Rates by Department · owner Zac · target ≤ 10

Also called: Repeat inspection failures

Definition: Active projects with two or more failed final inspections and none passed.

SQL
select '73' as "row", count(*) as "value", null::numeric as "num", null::numeric as "den"
from (
  select e.project_id
  from data_map_1.dm_ev_42_data e
  join phoenix.object_status es on es.id = e.object_status_id
  where e.archived = false and es.object_status in ('Inspection Passed', 'Inspection Failed')
  group by e.project_id
  having sum(case when es.object_status = 'Inspection Failed' then 1 else 0 end) >= 2
    and sum(case when es.object_status = 'Inspection Passed' then 1 else 0 end) = 0
) f
join data_map_1.dm_project_data p on p.project_id = f.project_id
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.object_status_id not in (select os.id from phoenix.object_status os where os.object_status in ('Canceled', 'Cancellation in Progress', 'Finalized')) and p.osc_674 is null

Pitfalls:

  • Counted by status today; not tied to the week.

PTO First-Pass Approval %

Weekly KPI Report row 74, Pass Rates by Department · owner Carson · target ≥ 97%

Also called: PTO pass rate

Definition: 1 − PTO rejections dated in the week ÷ PTO submissions in the week.

SQL
select '74' as "row", 1 - x.rej::numeric / nullif(x.sub, 0) as "value",
  (x.sub - x.rej)::numeric as "num", x.sub::numeric as "den"
from (
  select
    (select count(*)
      from data_map_1.dm_project_data p
      where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and p.osc_675 >= :week_start and p.osc_675 < :week_end) as sub,
    (select count(*)
      from phoenix.project_process_block_component_entry ce
      join phoenix.project_process_block b on b.id = ce.project_process_block_id
      join data_map_1.dm_project_data p on p.project_id = b.project_id
      where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and b.process_block_id = 28 and b.archived = false
        and ce.archived = false and ce.object_section_component_id = 1227
        and coalesce(ce.date_value, ce.timestamp_value::date) >= :week_start
        and coalesce(ce.date_value, ce.timestamp_value::date) < :week_end) as rej
) x

Pitfalls:

  • Despite the name, it doesn't look at first submissions: it compares two counts from different projects, so it can go negative in a week with few submissions.

Active Install Crews

Weekly KPI Report row 75, Capacity · owner Brian · target none (Track)

Also called: Crews in the field

Definition: Distinct crews on install appointments starting during the week.

SQL
select '75' as "row", count(distinct c.crew) as "value", null::numeric as "num", null::numeric as "den"
from data_map_1.dm_ev_41_data e
join data_map_1.dm_project_data p on p.project_id = e.project_id
cross join lateral unnest(e.organization_ids) as c(crew)
where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and e.archived = false and e.start_time >= :week_start and e.start_time < :week_end

Pitfalls:

  • Counts each organization on the appointment as a crew.

Completed Installs per Crew

Weekly KPI Report row 76, Capacity · owner Brian · target ≥ 2.4

Also called: Installs per crew

Definition: Install appointments starting in the week with status Complete ÷ active crews (row 75).

SQL
select '76' as "row", x.comp::numeric / nullif(x.crews, 0) as "value", x.comp::numeric as "num",
  x.crews::numeric as "den"
from (
  select
    (select count(*)
      from data_map_1.dm_ev_41_data e
      join data_map_1.dm_project_data p on p.project_id = e.project_id
      where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and e.archived = false
        and e.object_status_id in (select es.id from phoenix.object_status es where es.object_status = 'Complete')
        and e.start_time >= :week_start and e.start_time < :week_end) as comp,
    (select count(distinct c.crew)
      from data_map_1.dm_ev_41_data e
      join data_map_1.dm_project_data p on p.project_id = e.project_id
      cross join lateral unnest(e.organization_ids) as c(crew)
      where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and e.archived = false
        and e.start_time >= :week_start and e.start_time < :week_end) as crews
) x

Pitfalls:

  • Counts appointments by status, not the audit result.

Ready for Audit → Audit Result (median minutes)

Weekly KPI Report row 76a, Capacity · owner Zac · target ≤ 25 min

Also called: Audit speed

Definition: Median minutes from an install appointment first moving to Ready for Audit to its first field audit result.

SQL
select '76a' as "row", percentile_cont(0.5) within group (order by x.mins) as "value",
  count(*)::numeric as "num", null::numeric as "den"
from (
  select extract(epoch from (r.res_at - r.rfa_at)) / 60.0 as mins, r.res_at
  from (
    select a.rfa_at, (
      select min(ca.changed_at)
      from phoenix.project_process_block_event_component_entry_audit ca
      where ca.project_process_block_event_id = a.event_id
        and ca.object_section_component_id = 639 and ca.int_value in (304, 305)
        and ca.changed_at > a.rfa_at
    ) as res_at
    from (
      select ea.project_process_block_event_id as event_id, min(ea.changed_at) as rfa_at
      from phoenix.project_process_block_event_audit ea
      join phoenix.object_status es on es.id = ea.object_status_id
      join data_map_1.dm_ev_41_data e on e.project_process_block_event_id = ea.project_process_block_event_id
      join data_map_1.dm_project_data p on p.project_id = e.project_id
      where p.archived = false and p.object_type_id = 6 and coalesce(cast(p.osc_4076 as integer), 0) = 0 and es.object_status = 'Ready for Audit'
        and ea.changed_at >= :week_start - 30 and ea.changed_at < :week_end
      group by ea.project_process_block_event_id
    ) a
  ) r
  where r.res_at >= :week_start and r.res_at < :week_end
) x

Pitfalls:

  • Reads the audit trail; can be slow.

OSHA Recordables

Weekly KPI Report row 77, Safety · owner Brian · target 0

Also called: OSHA recordables

Definition: OSHA-recordable injuries during the week.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

Lost Time Incidents

Weekly KPI Report row 78, Safety · owner Brian · target 0

Also called: LTIs

Definition: Injuries that caused lost work time during the week.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

First Aid Incidents

Weekly KPI Report row 79, Safety · owner Brian · target none (Track)

Also called: First aid

Definition: First-aid-only incidents during the week.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

Near Misses Reported

Weekly KPI Report row 80, Safety · owner Brian · target none (Track)

Also called: Near misses

Definition: Near misses reported during the week.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

Safety Audits Completed

Weekly KPI Report row 81, Safety · owner Brian · target none (Track)

Also called: Safety audits

Definition: Safety audits completed during the week.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

Safety Audits as % of Crews

Weekly KPI Report row 81a, Safety · owner Brian · target ≥ 50%

Also called: Safety audit coverage

Definition: Safety audits (row 81) ÷ active install crews (row 75).

SQL: Row 81 (typed) ÷ row 75 for the same week.

Pitfalls:

  • Empty in a week row 81 wasn't typed in.

Total Customer Reviews

Weekly KPI Report row 82, Customer Reviews · owner Maile · target none (Track)

Also called: Reviews

Definition: Customer reviews received during the week.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

Average Rating

Weekly KPI Report row 83, Customer Reviews · owner Maile · target ≥ 4.7

Also called: Star rating

Definition: Average star rating of the week's reviews.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

5-Star Review %

Weekly KPI Report row 84, Customer Reviews · owner Allie · target ≥ 90%

Also called: 5-star rate

Definition: Share of the week's reviews that were 5 stars.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

Negative Reviews (1–2 stars / BBB complaints)

Weekly KPI Report row 85, Customer Reviews · owner Allie · target 0

Also called: Bad reviews; complaints

Definition: 1- or 2-star reviews and BBB complaints received during the week.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

Inbound Calls

Weekly KPI Report row 86, Phones · owner Maile · target none (Track)

Also called: Calls

Definition: Inbound phone calls during the week.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

% Answered Within 30 Seconds

Weekly KPI Report row 87, Phones · owner Allie · target ≥ 85%

Also called: Speed to answer

Definition: Share of inbound calls answered within 30 seconds.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

% Answered

Weekly KPI Report row 88, Phones · owner Allie · target ≥ 95%

Also called: Answer rate

Definition: Share of inbound calls answered.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

Installer Headcount

Weekly KPI Report row 89, Headcount & Turnover · owner Kallen · target none (Track)

Also called: Installers

Definition: Installer headcount.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

Corporate Operations Headcount

Weekly KPI Report row 90, Headcount & Turnover · owner Kallen · target none (Track)

Also called: Corporate headcount

Definition: Corporate operations headcount.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

Rolling 12-Wk Installer Turnover %

Weekly KPI Report row 91, Headcount & Turnover · owner Kallen · target ≤ 25%

Also called: Installer turnover

Definition: Installer turnover over the last 12 weeks, as a percent.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

Rolling 12-Wk Corporate Turnover %

Weekly KPI Report row 92, Headcount & Turnover · owner Kallen · target ≤ 15%

Also called: Corporate turnover

Definition: Corporate turnover over the last 12 weeks, as a percent.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

# of Referrals Received

Weekly KPI Report row 93, Referrals · owner Allie · target none (Track)

Also called: Referrals

Definition: Referrals received during the week.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

# of Referrals Signed

Weekly KPI Report row 94, Referrals · owner Allie · target none (Track)

Also called: Referrals closed

Definition: Referrals that signed during the week.

SQL: None. The row's owner types it in each week on the Lumen report page.

Pitfalls: None beyond the report's rules.

M1 Financier Approvals

Funding Dashboard M1 Funding: Approvals tile; Coordinator and Crew Performance (Approved) · target none

Also called: M1 approvals; Approved

Definition: M1 funding blocks the financier approved, dated by when the block was decided.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and m.osc_1161 is not null
  and coalesce(m.osc_1468, m.osc_1161)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Dated by Outcome Date, which for M1 is the rejected date when a block has one. An approved block that also carries a rejected date is counted on the day it was rejected.
  • Counts blocks, not projects, and includes every project type and archived blocks. The Weekly KPI Report's M1 Approved counts Residential solar projects by the project-level date, so the two differ.

M1 Financier Rejections

Funding Dashboard M1 Funding: Financier Rejections tile; Coordinator Performance (Financier Rejected); Crew Performance (Rejected) · target none

Also called: M1 financier rejections

Definition: M1 funding blocks the financier rejected (Funding Rejected By = Financier).

SQL
select count(*) as value
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and (m.osc_1468 is not null and rb.list_value = 'Financier')
  and coalesce(m.osc_1468, m.osc_1161)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Rejections by the funding team in internal QC are not counted here; they're Internal QC Rejections.
  • A rejection with Funding Rejected By left blank counts as neither a financier nor a funding team rejection.

M1 Financier Outcomes

Funding Dashboard M1 Funding: Total Outcomes tile; Coordinator Performance (Financier Total); Crew Performance (Total) · target none

Also called: Total Outcomes; Total

Definition: M1 funding blocks the financier decided (approved or rejected).

SQL
select count(*) as value
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and (m.osc_1161 is not null or (m.osc_1468 is not null and rb.list_value = 'Financier'))
  and coalesce(m.osc_1468, m.osc_1161)::date between :start_date and :end_date  -- Outcome Date

Pitfalls: None beyond the report's rules.

M1 Financier Pass Rate

Funding Dashboard Banner: M1 Overall; M1 Funding: Overall Pass Rate tile; Coordinator and Crew Performance · target ≥ 95%

Also called: M1 Overall; Overall Pass Rate; Overall Financier Pass Rate; "Financier Only"

Definition: Of the M1 blocks the financier decided, the share it approved, resubmissions included.

SQL
select count(m.osc_1161)::numeric / nullif((count(m.osc_1161) + sum(case when (m.osc_1468 is not null and rb.list_value = 'Financier') then 1 else 0 end)), 0) as value,
  count(m.osc_1161) as num, (count(m.osc_1161) + sum(case when (m.osc_1468 is not null and rb.list_value = 'Financier') then 1 else 0 end)) as den
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(m.osc_1468, m.osc_1161)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • A block with both an approved date and a financier rejection counts twice on the bottom of the M1 formula (M2 counts it once). One block did in October 2026: 254 approvals + 57 rejections, but 310 outcomes.
  • Only financier rejections count against it. Lumen's Executive Funding approval rate counts the funding team's rejections too (Conflict 27). The Weekly KPI Report's nearest row, 56a, counts only each solar project's first block with a financier outcome.

M1 Internal QC Pass Rate

Funding Dashboard Banner: M1 Internal Overall Pass Rate; M1 Funding: Internal QC Pass Rate tile · target ≥ 90%

Also called: M1 Internal Overall Pass Rate; QC Pass Rate; internal pass rate

Definition: Of the M1 packages through the funding team's internal QC, the share sent on to the financier rather than sent back.

SQL
select count(m.osc_1160)::numeric / nullif((count(m.osc_1160) + sum(case when (m.osc_1468 is not null and rb.list_value = 'Funding Team') then 1 else 0 end)), 0) as value,
  count(m.osc_1160) as num, (count(m.osc_1160) + sum(case when (m.osc_1468 is not null and rb.list_value = 'Funding Team') then 1 else 0 end)) as den
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(case when m.osc_1468 is not null and rb.list_value = 'Funding Team' then m.osc_1468 end, m.osc_1160)::date
    between :start_date and :end_date  -- QC Outcome Date

Pitfalls:

  • Dated by QC Outcome Date: the funding team's rejection date, else the submitted date. So it covers packages decided by QC in the range, whatever the financier did later.
  • A block both submitted and rejected by the funding team counts twice on the bottom (M2 counts it once).
  • The target shown is the 90% first-time target.
  • Not the Weekly KPI Report's M1 First-Pass Approval % (row 56), which counts solar projects by week and pairs different projects' submissions and rejections.

M1 First Time Internal QC Pass Rate

Funding Dashboard Banner: M1 First Time Internal Pass Rate; M1 Funding: M1 First Time Internal Pass Rate tile · target ≥ 90%

Also called: M1 First Time Internal Pass Rate; first-time QC pass rate

Definition: Internal QC pass rate on each project's first M1 block only.

SQL
select count(m.osc_1160)::numeric / nullif((count(m.osc_1160) + sum(case when (m.osc_1468 is not null and rb.list_value = 'Funding Team') then 1 else 0 end)), 0) as value,
  count(m.osc_1160) as num, (count(m.osc_1160) + sum(case when (m.osc_1468 is not null and rb.list_value = 'Funding Team') then 1 else 0 end)) as den
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and not exists (  -- the project's first M1 block
    select 1 from data_map_1.dm_pb_26_data e
    where e.project_id = m.project_id
      and (e.date_created, e.project_process_block_id) < (m.date_created, m.project_process_block_id))
  and coalesce(case when m.osc_1468 is not null and rb.list_value = 'Funding Team' then m.osc_1468 end, m.osc_1160)::date
    between :start_date and :end_date  -- QC Outcome Date

Pitfalls:

  • "First" is the project's first block of this kind by creation date, whether or not it was ever submitted.
  • Dated by QC Outcome Date.

M1 First Time Financier Pass Rate

Funding Dashboard Banner: M1 First Time; M1 Funding: First Time Financier Pass Rate tile; Coordinator and Crew Performance · target ≥ 90%

Also called: M1 First Time; First Time Pass Rate; Financier First Time Pass Rate

Definition: Of each project's first M1 submission to the financier, the share the financier approved, dated by when it was decided.

SQL
select sum(case when m.osc_1161 is not null then 1 else 0 end)::numeric / nullif(sum(case when (m.osc_1161 is not null or (m.osc_1468 is not null and rb.list_value = 'Financier')) then 1 else 0 end), 0) as value,
  sum(case when m.osc_1161 is not null then 1 else 0 end) as num, sum(case when (m.osc_1161 is not null or (m.osc_1468 is not null and rb.list_value = 'Financier')) then 1 else 0 end) as den
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and m.osc_1160 is not null and not exists (  -- the project's first submission to the financier
    select 1 from data_map_1.dm_pb_26_data e
    where e.project_id = m.project_id and e.osc_1160 is not null
      and (e.date_created, e.project_process_block_id) < (m.date_created, m.project_process_block_id))
  and coalesce(m.osc_1468, m.osc_1161)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • "First submission" is the project's earliest block with a submitted date. If the financier hasn't decided it, or the funding team rejected it, the project drops out rather than moving on to its next submission.
  • Not the Weekly KPI Report's row 56a, which uses each project's first block that got a financier outcome, for solar projects only.

M1 Internal QC Rejections

Funding Dashboard Coordinator and Crew Performance (Internal QCs Rejected) · target none

Also called: Internal QCs Rejected; funding team rejections; FT rejections

Definition: M1 blocks the funding team rejected in internal QC, before the financier saw them.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and (m.osc_1468 is not null and rb.list_value = 'Funding Team')
  and coalesce(m.osc_1468, m.osc_1161)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • On the boards this is dated by Outcome Date, not QC Outcome Date.

M1 Internal QC Pass Rate (Decided Blocks)

Funding Dashboard Coordinator and Crew Performance (Internal QC Approval Rate) · target ≥ 90%

Also called: Internal QC Approval Rate

Definition: The internal QC pass rate as the Coordinator and Crew Performance tables compute it: only M1 blocks decided in the range by the financier or the funding team.

SQL
select count(m.osc_1160)::numeric / nullif((count(m.osc_1160) + sum(case when (m.osc_1468 is not null and rb.list_value = 'Funding Team') then 1 else 0 end)), 0) as value,
  count(m.osc_1160) as num, (count(m.osc_1160) + sum(case when (m.osc_1468 is not null and rb.list_value = 'Funding Team') then 1 else 0 end)) as den
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(m.osc_1468, m.osc_1161)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Same formula as Internal QC Pass Rate but dated by Outcome Date, so packages submitted and still waiting on the financier are left out. Board figures can differ from the tiles above them.

M1 First Time Internal QC Pass Rate (Decided Blocks)

Funding Dashboard Coordinator and Crew Performance (First Time Internal Pass Rate) · target ≥ 90%

Also called: First Time Internal Pass Rate (on the boards)

Definition: First-time internal QC pass rate over each project's first M1 block, counting only blocks decided in the range.

SQL
select count(m.osc_1160)::numeric / nullif((count(m.osc_1160) + sum(case when (m.osc_1468 is not null and rb.list_value = 'Funding Team') then 1 else 0 end)), 0) as value,
  count(m.osc_1160) as num, (count(m.osc_1160) + sum(case when (m.osc_1468 is not null and rb.list_value = 'Funding Team') then 1 else 0 end)) as den
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and not exists (  -- the project's first M1 block
    select 1 from data_map_1.dm_pb_26_data e
    where e.project_id = m.project_id
      and (e.date_created, e.project_process_block_id) < (m.date_created, m.project_process_block_id))
  and coalesce(m.osc_1468, m.osc_1161)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Dated by Outcome Date; won't match the tile of the same name.

M1 CT Issues

Funding Dashboard Crew Performance (CT Issues) · target none

Also called: CT meter issues

Definition: M1 blocks whose rejection reason includes "CT Meter Issue".

SQL
select count(*) as value
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and exists (select 1 from phoenix.list_value lv
    where lv.list_value = 'CT Meter Issue'
      and ',' || coalesce(array_to_string(m.osc_1248, ','), '') || ',' like '%,' || cast(lv.id as varchar) || ',%')
  and coalesce(m.osc_1468, m.osc_1161)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • The reason is "CT Meter Issue" on M1; the other milestone uses "CT Issue". Searching for one name misses the other.

M1 CT Issue Rate

Funding Dashboard Crew Performance (CT Issue Rate; the table is sorted by it) · target none

Also called: CT rate

Definition: M1 CT issues ÷ projects' first M1 submissions to the financier, decided in the range.

SQL
select sum(case when exists (select 1 from phoenix.list_value lv
    where lv.list_value = 'CT Meter Issue'
      and ',' || coalesce(array_to_string(m.osc_1248, ','), '') || ',' like '%,' || cast(lv.id as varchar) || ',%') then 1 else 0 end)::numeric / nullif(sum(case when m.osc_1160 is not null and not exists (
    select 1 from data_map_1.dm_pb_26_data e
    where e.project_id = m.project_id and e.osc_1160 is not null
      and (e.date_created, e.project_process_block_id) < (m.date_created, m.project_process_block_id)) then 1 else 0 end), 0) as value,
  sum(case when exists (select 1 from phoenix.list_value lv
    where lv.list_value = 'CT Meter Issue'
      and ',' || coalesce(array_to_string(m.osc_1248, ','), '') || ',' like '%,' || cast(lv.id as varchar) || ',%') then 1 else 0 end) as num, sum(case when m.osc_1160 is not null and not exists (
    select 1 from data_map_1.dm_pb_26_data e
    where e.project_id = m.project_id and e.osc_1160 is not null
      and (e.date_created, e.project_process_block_id) < (m.date_created, m.project_process_block_id)) then 1 else 0 end) as den
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(m.osc_1468, m.osc_1161)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • The top counts CT issues on any block; the bottom counts only first submissions, so the rate can exceed 100% for a crew with repeat CT problems.

M1 First Time Financier Outcomes

Funding Dashboard Crew Performance (First Time Subs) · target none

Also called: First Time Subs

Definition: Projects whose first M1 submission the financier decided in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and m.osc_1160 is not null and not exists (  -- the project's first submission to the financier
    select 1 from data_map_1.dm_pb_26_data e
    where e.project_id = m.project_id and e.osc_1160 is not null
      and (e.date_created, e.project_process_block_id) < (m.date_created, m.project_process_block_id))
  and (m.osc_1161 is not null or (m.osc_1468 is not null and rb.list_value = 'Financier'))
  and coalesce(m.osc_1468, m.osc_1161)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Despite the label "Subs", it counts decided first submissions, not submissions made.

M1 Submitted (Decided Blocks)

Funding Dashboard Coordinator Performance (M1 Submitted) · target none

Also called: M1 Submitted (on the Coordinator board)

Definition: M1 blocks with a submitted date that were decided in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and m.osc_1160 is not null
  and coalesce(m.osc_1468, m.osc_1161)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Dated by Outcome Date, so it isn't the number of packages submitted in the range. For that, see the Weekly KPI Report's row 55.

M1 Rejections by Attribution

Funding Dashboard M1 Funding: Rejection Attribution donut · target none

Also called: Rejection Attribution; Rejection Attributable; who caused the rejection

Definition: M1 rejections decided in the range, counted by who they're attributed to.

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
join phoenix.list_value lv
  on ',' || coalesce(array_to_string(m.osc_1469, ','), '') || ',' like '%,' || cast(lv.id as varchar) || ',%'
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(m.osc_1468, m.osc_1161)::date between :start_date and :end_date  -- Outcome Date
  and rb.list_value is not null
group by lv.list_value
order by value desc

Pitfalls:

  • A rejection attributed to two teams counts once for each, so the slices add up to more than the rejections.
  • Install Crew and Installers are the same team under its old and new names; add them together.
  • Counts only rejections with Funding Rejected By filled in (financier or funding team).

M1 Rejections by Reason

Funding Dashboard M1 Funding: Rejection Reason chart · target none

Also called: Rejection Reason

Definition: M1 rejections decided in the range, counted by rejection reason.

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_pb_26_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1762  -- Funding Rejected By
join phoenix.list_value lv
  on ',' || coalesce(array_to_string(m.osc_1248, ','), '') || ',' like '%,' || cast(lv.id as varchar) || ',%'
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(m.osc_1468, m.osc_1161)::date between :start_date and :end_date  -- Outcome Date
group by lv.list_value
order by value desc

Pitfalls:

  • A rejection with two reasons counts once for each.

M2 Financier Approvals

Funding Dashboard M2 Funding: Approvals tile; Coordinator and Crew Performance (Approved) · target none

Also called: M2 approvals; Approved

Definition: M2 funding blocks the financier approved, dated by when the block was decided.

SQL
select count(*) as value
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and m.osc_1257 is not null
  and coalesce(m.osc_1257, m.osc_1533)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Dated by Outcome Date (the approved date, else the rejected date).
  • Counts blocks, not projects, and includes every project type and archived blocks. The Weekly KPI Report's M2 Approved counts Residential solar projects by the project-level date, so the two differ.

M2 Financier Rejections

Funding Dashboard M2 Funding: Rejections tile; Coordinator and Crew Performance (Rejected) · target none

Also called: M2 Rejections

Definition: M2 funding blocks the financier rejected (Funding Rejected By = Financier).

SQL
select count(*) as value
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and (m.osc_1533 is not null and rb.list_value = 'Financier')
  and coalesce(m.osc_1257, m.osc_1533)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Rejections by the funding team in internal QC are not counted here; they're Internal QC Rejections.
  • A rejection with Funding Rejected By left blank counts as neither a financier nor a funding team rejection.

M2 Financier Outcomes

Funding Dashboard M2 Funding: Total Outcomes tile; Coordinator and Crew Performance (Total) · target none

Also called: Total Outcomes; Total

Definition: M2 funding blocks the financier decided (approved or rejected).

SQL
select count(*) as value
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and (m.osc_1257 is not null or (m.osc_1533 is not null and rb.list_value = 'Financier'))
  and coalesce(m.osc_1257, m.osc_1533)::date between :start_date and :end_date  -- Outcome Date

Pitfalls: None beyond the report's rules.

M2 Financier Pass Rate

Funding Dashboard Banner: M2 Overall; M2 Funding: Overall Pass Rate tile; Coordinator and Crew Performance · target ≥ 95%

Also called: M2 Overall; Overall Pass Rate; Overall Financier Pass Rate; "Financier Only"

Definition: Of the M2 blocks the financier decided, the share it approved, resubmissions included.

SQL
select sum(case when m.osc_1257 is not null then 1 else 0 end)::numeric / nullif(sum(case when (m.osc_1257 is not null or (m.osc_1533 is not null and rb.list_value = 'Financier')) then 1 else 0 end), 0) as value,
  sum(case when m.osc_1257 is not null then 1 else 0 end) as num, sum(case when (m.osc_1257 is not null or (m.osc_1533 is not null and rb.list_value = 'Financier')) then 1 else 0 end) as den
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(m.osc_1257, m.osc_1533)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Each decided block counts once.
  • Only financier rejections count against it. Lumen's Executive Funding approval rate counts the funding team's rejections too (Conflict 27). The Weekly KPI Report's nearest row, 60a, counts only each solar project's first block with a financier outcome.

M2 Internal QC Pass Rate

Funding Dashboard Banner: M2 Internal; M2 Funding: Internal QC Pass Rate tile · target ≥ 90%

Also called: M2 Internal; FT Pass Rate; QC Pass Rate; internal pass rate

Definition: Of the M2 packages through the funding team's internal QC, the share sent on to the financier rather than sent back.

SQL
select count(m.osc_1256)::numeric / nullif(sum(case when m.osc_1256 is not null or (m.osc_1533 is not null and rb.list_value = 'Funding Team') then 1 else 0 end), 0) as value,
  count(m.osc_1256) as num, sum(case when m.osc_1256 is not null or (m.osc_1533 is not null and rb.list_value = 'Funding Team') then 1 else 0 end) as den
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(case when m.osc_1533 is not null and rb.list_value = 'Funding Team' then m.osc_1533 end, m.osc_1256)::date
    between :start_date and :end_date  -- QC Outcome Date

Pitfalls:

  • Dated by QC Outcome Date: the funding team's rejection date, else the submitted date. So it covers packages decided by QC in the range, whatever the financier did later.
  • A block both submitted and rejected by the funding team counts once on the bottom.
  • The target shown is the 90% first-time target.
  • Not the Weekly KPI Report's M2 First-Pass Approval % (row 60), which counts solar projects by week and pairs different projects' submissions and rejections.

M2 First Time Internal QC Pass Rate

Funding Dashboard M2 Funding: First Time Internal QC Pass Rate tile · target ≥ 90%

Also called: M2 First Time Internal Pass Rate; first-time QC pass rate

Definition: Internal QC pass rate on each project's first M2 block only.

SQL
select count(m.osc_1256)::numeric / nullif((count(m.osc_1256) + sum(case when (m.osc_1533 is not null and rb.list_value = 'Funding Team') then 1 else 0 end)), 0) as value,
  count(m.osc_1256) as num, (count(m.osc_1256) + sum(case when (m.osc_1533 is not null and rb.list_value = 'Funding Team') then 1 else 0 end)) as den
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and not exists (  -- the project's first M2 block
    select 1 from data_map_1.dm_pb_27_data e
    where e.project_id = m.project_id
      and (e.date_created, e.project_process_block_id) < (m.date_created, m.project_process_block_id))
  and coalesce(case when m.osc_1533 is not null and rb.list_value = 'Funding Team' then m.osc_1533 end, m.osc_1256)::date
    between :start_date and :end_date  -- QC Outcome Date

Pitfalls:

  • "First" is the project's first block of this kind by creation date, whether or not it was ever submitted.
  • Dated by QC Outcome Date.

M2 First Time Financier Pass Rate

Funding Dashboard Banner: M2 First Time; M2 Funding: First Time Pass Rate tile; Coordinator and Crew Performance · target ≥ 90%

Also called: M2 First Time; First Time Pass Rate; Financier First Time Pass Rate

Definition: Of each project's first M2 submission to the financier, the share the financier approved, dated by when it was decided.

SQL
select sum(case when m.osc_1257 is not null then 1 else 0 end)::numeric / nullif(sum(case when (m.osc_1257 is not null or (m.osc_1533 is not null and rb.list_value = 'Financier')) then 1 else 0 end), 0) as value,
  sum(case when m.osc_1257 is not null then 1 else 0 end) as num, sum(case when (m.osc_1257 is not null or (m.osc_1533 is not null and rb.list_value = 'Financier')) then 1 else 0 end) as den
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and m.osc_1256 is not null and not exists (  -- the project's first submission to the financier
    select 1 from data_map_1.dm_pb_27_data e
    where e.project_id = m.project_id and e.osc_1256 is not null
      and (e.date_created, e.project_process_block_id) < (m.date_created, m.project_process_block_id))
  and coalesce(m.osc_1257, m.osc_1533)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • "First submission" is the project's earliest block with a submitted date. If the financier hasn't decided it, or the funding team rejected it, the project drops out rather than moving on to its next submission.
  • Not the Weekly KPI Report's row 60a, which uses each project's first block that got a financier outcome, for solar projects only.

M2 Internal QC Rejections

Funding Dashboard Coordinator and Crew Performance (Internal QCs Rejected) · target none

Also called: Internal QCs Rejected; funding team rejections; FT rejections

Definition: M2 blocks the funding team rejected in internal QC, before the financier saw them.

SQL
select count(*) as value
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and (m.osc_1533 is not null and rb.list_value = 'Funding Team')
  and coalesce(m.osc_1257, m.osc_1533)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • On the boards this is dated by Outcome Date, not QC Outcome Date.
  • The M2 boards only show blocks submitted by the 20 coordinators named in the dashboard's filter.

M2 Internal QC Pass Rate (Decided Blocks)

Funding Dashboard Coordinator and Crew Performance (Internal QC Pass Rate) · target ≥ 90%

Also called: Internal QC Pass Rate (on the boards)

Definition: The internal QC pass rate as the Coordinator and Crew Performance tables compute it: only M2 blocks decided in the range by the financier or the funding team.

SQL
select count(m.osc_1256)::numeric / nullif(sum(case when m.osc_1256 is not null or (m.osc_1533 is not null and rb.list_value = 'Funding Team') then 1 else 0 end), 0) as value,
  count(m.osc_1256) as num, sum(case when m.osc_1256 is not null or (m.osc_1533 is not null and rb.list_value = 'Funding Team') then 1 else 0 end) as den
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(m.osc_1257, m.osc_1533)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Same formula as Internal QC Pass Rate but dated by Outcome Date, so packages submitted and still waiting on the financier are left out. Board figures can differ from the tiles above them.

M2 First Time Internal QC Pass Rate (Decided Blocks)

Funding Dashboard Coordinator and Crew Performance (First Time Internal Pass Rate) · target ≥ 90%

Also called: First Time Internal Pass Rate (on the boards)

Definition: First-time internal QC pass rate over each project's first M2 block, counting only blocks decided in the range.

SQL
select count(m.osc_1256)::numeric / nullif((count(m.osc_1256) + sum(case when (m.osc_1533 is not null and rb.list_value = 'Funding Team') then 1 else 0 end)), 0) as value,
  count(m.osc_1256) as num, (count(m.osc_1256) + sum(case when (m.osc_1533 is not null and rb.list_value = 'Funding Team') then 1 else 0 end)) as den
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and not exists (  -- the project's first M2 block
    select 1 from data_map_1.dm_pb_27_data e
    where e.project_id = m.project_id
      and (e.date_created, e.project_process_block_id) < (m.date_created, m.project_process_block_id))
  and coalesce(m.osc_1257, m.osc_1533)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Dated by Outcome Date; won't match the tile of the same name.

M2 CT Issues

Funding Dashboard Crew Performance (CT Issues) · target none

Also called: CT meter issues

Definition: M2 blocks whose rejection reason includes "CT Issue".

SQL
select count(*) as value
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and exists (select 1 from phoenix.list_value lv
    where lv.list_value = 'CT Issue'
      and ',' || coalesce(array_to_string(m.osc_1259, ','), '') || ',' like '%,' || cast(lv.id as varchar) || ',%')
  and coalesce(m.osc_1257, m.osc_1533)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • The reason is "CT Issue" on M2; the other milestone uses "CT Meter Issue". Searching for one name misses the other.

M2 CT Issue Rate

Funding Dashboard Crew Performance (CT Issue Rate; the table is sorted by it) · target none

Also called: CT rate

Definition: M2 CT issues ÷ projects' first M2 submissions to the financier, decided in the range.

SQL
select sum(case when exists (select 1 from phoenix.list_value lv
    where lv.list_value = 'CT Issue'
      and ',' || coalesce(array_to_string(m.osc_1259, ','), '') || ',' like '%,' || cast(lv.id as varchar) || ',%') then 1 else 0 end)::numeric / nullif(sum(case when m.osc_1256 is not null and not exists (
    select 1 from data_map_1.dm_pb_27_data e
    where e.project_id = m.project_id and e.osc_1256 is not null
      and (e.date_created, e.project_process_block_id) < (m.date_created, m.project_process_block_id)) then 1 else 0 end), 0) as value,
  sum(case when exists (select 1 from phoenix.list_value lv
    where lv.list_value = 'CT Issue'
      and ',' || coalesce(array_to_string(m.osc_1259, ','), '') || ',' like '%,' || cast(lv.id as varchar) || ',%') then 1 else 0 end) as num, sum(case when m.osc_1256 is not null and not exists (
    select 1 from data_map_1.dm_pb_27_data e
    where e.project_id = m.project_id and e.osc_1256 is not null
      and (e.date_created, e.project_process_block_id) < (m.date_created, m.project_process_block_id)) then 1 else 0 end) as den
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(m.osc_1257, m.osc_1533)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • The top counts CT issues on any block; the bottom counts only first submissions, so the rate can exceed 100% for a crew with repeat CT problems.

M2 First Time Financier Outcomes

Funding Dashboard Crew Performance (First Time Subs) · target none

Also called: First Time Subs

Definition: Projects whose first M2 submission the financier decided in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and m.osc_1256 is not null and not exists (  -- the project's first submission to the financier
    select 1 from data_map_1.dm_pb_27_data e
    where e.project_id = m.project_id and e.osc_1256 is not null
      and (e.date_created, e.project_process_block_id) < (m.date_created, m.project_process_block_id))
  and (m.osc_1257 is not null or (m.osc_1533 is not null and rb.list_value = 'Financier'))
  and coalesce(m.osc_1257, m.osc_1533)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Despite the label "Subs", it counts decided first submissions, not submissions made.

M2 Rejections by Attribution

Funding Dashboard M2 Funding: Rejection Attributable donut · target none

Also called: Rejection Attribution; Rejection Attributable; who caused the rejection

Definition: M2 rejections decided in the range, counted by who they're attributed to.

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
join phoenix.list_value lv
  on ',' || coalesce(array_to_string(m.osc_1531, ','), '') || ',' like '%,' || cast(lv.id as varchar) || ',%'
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(m.osc_1257, m.osc_1533)::date between :start_date and :end_date  -- Outcome Date
group by lv.list_value
order by value desc

Pitfalls:

  • A rejection attributed to two teams counts once for each, so the slices add up to more than the rejections.
  • Install Crew and Installers are the same team under its old and new names; add them together.
  • Counts any block decided in the range that has an attribution, without checking who rejected it.

M2 Rejections by Reason

Funding Dashboard M2 Funding: Rejection Reason chart · target none

Also called: Rejection Reason

Definition: M2 rejections decided in the range, counted by rejection reason.

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_pb_27_data m
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
join phoenix.list_value lv
  on ',' || coalesce(array_to_string(m.osc_1259, ','), '') || ',' like '%,' || cast(lv.id as varchar) || ',%'
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(m.osc_1257, m.osc_1533)::date between :start_date and :end_date  -- Outcome Date
group by lv.list_value
order by value desc

Pitfalls:

  • A rejection with two reasons counts once for each.

Gross Sales (#)

Executive Dashboard Sales: Residential Solar Gross Sales tile; YoY Gross Sales; Sales by State, Month, Company/Office; Setter and Closer Leaderboards; Clean Deals Breakdown (Total Sales) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Gross sales; projects sold; contracts signed

Definition: Residential projects sold in the range, canceled ones included.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Residential (object type 6) only, though the dashboard's own dataset counts every type; Lumen's port and this SQL follow the Sales sheet's titles, which say Residential Solar.
  • Dated by Project Submitted (OSC 660). The Forecast vs Actuals lines date sales by the contract's signed date instead (see Gross Sales vs Forecast).

Net Sales (#)

Executive Dashboard Sales: Residential Solar Net Sales tile; YoY Net Sales; Sales by State, Month, Company/Office; Setter and Closer Leaderboards · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Net sales; sales not canceled

Definition: Residential projects sold in the range that aren't canceled now.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Uses each project's status today, so last month's net sales shrink as projects cancel.
  • On Hold (status 34) counts as a net sale here but not in the Forecast vs Actuals lines' Net Sales.

Clean Deals (#)

Executive Dashboard Sales: Gross Sales tile; Clean Deals Breakdown (Clean Sale) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Clean sales

Definition: Residential projects sold in the range that passed Deal Review clean.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_1991 = true  -- Clean Sale
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Recent sales without a verdict yet aren't counted, so this rises for weeks after the range.

Dirty Sales (#)

Executive Dashboard Sales: Clean Deals Breakdown (Dirty Sale) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Dirty deals

Definition: Residential projects sold in the range that Deal Review marked not clean.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_1991 = false  -- Clean Sale unchecked
  and p.osc_660::date between :start_date and :end_date

Pitfalls: None beyond the report's rules.

Undispositioned Sales (#)

Executive Dashboard Sales: Clean Deals Breakdown (Undispositioned) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: No Clean Sale verdict yet

Definition: Residential projects sold in the range with no Clean Sale verdict yet.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_1991 is null
  and p.osc_660::date between :start_date and :end_date

Pitfalls: None beyond the report's rules.

Clean Deal %

Executive Dashboard Sales: Gross Sales tile; Clean Deals Breakdown; Clean Deal % Over Time · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Clean sale rate

Definition: Of the residential projects sold in the range that have a Deal Review verdict, the share that were clean.

SQL
select sum(case when p.osc_1991 then 1 else 0 end)::numeric / nullif(count(p.osc_1991), 0) as value,
  sum(case when p.osc_1991 then 1 else 0 end) as num, count(p.osc_1991) as den
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Projects with no verdict are left out of both the top and the bottom.
  • Not the Weekly KPI Report's Clean Sale % (row 22), which counts by week; the logic is the same.

Cancellation Rate

Executive Dashboard Sales: Gross Sales tile · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Cancel rate

Definition: Of the residential projects sold in the range, the share now Canceled or Cancellation in Progress.

SQL
select sum(case when p.object_status_id in (58, 59) then 1 else 0 end)::numeric / nullif(count(*), 0) as value,
  sum(case when p.object_status_id in (58, 59) then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Status today, so a recent range looks better than it will. The Weekly KPI Report's Cancel % of Sold (row 19) uses a fixed 5-to-8-week-old cohort instead.

Gross Sales ($)

Executive Dashboard Sales: Gross Sales tile; Sales by Month; Sales by Company, Office (Package Price) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Gross sales dollars; package price sold

Definition: Total package price of the residential projects sold in the range.

SQL
select sum(c.osc_28) as value  -- Total Package Price
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Package price (OSC 28), not the amount financed.

Net Sales ($)

Executive Dashboard Sales: Net Sales tile · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Net sales dollars

Definition: Total package price of the residential projects sold in the range that aren't canceled.

SQL
select sum(c.osc_28) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_660::date between :start_date and :end_date

Pitfalls: None beyond the report's rules.

Gross Sales (kW, Contract)

Executive Dashboard Sales: Gross Sales tile (Gross Sales (kW)); Sales by Company, Office (System Size) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Gross Sales (kW); contracted kW

Definition: Total contracted system size (kW) of residential projects sold in the range.

SQL
select sum(c.osc_35) as value  -- the main contract's System Size kW
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Contract kW. Gross kW on the same sheet uses the installed size where there is one, so the two differ.

Net Sales (kW, Contract)

Executive Dashboard Sales: Net Sales tile (Net Sales (kW)); Setter and Closer Leaderboards (Net kW) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Net Sales (kW); Net kW (Contract); Net kW on the leaderboards

Definition: Total contracted kW of residential projects sold in the range and not canceled.

SQL
select sum(c.osc_35) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • The leaderboards' "Net kW" is this contract figure, while Sales by State's "Net kW" is the installed-size figure (Net kW (True Size)).

Gross kW (True Size)

Executive Dashboard Sales: Sales by State (Gross kW); Sales by Month · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Gross kW

Definition: Total system size of residential projects sold in the range, using the installed size where known, else designed, else contract.

SQL
select sum(coalesce(case when kw.installed > 1000 then kw.installed / 1000.0 else kw.installed end,
    case when kw.designed > 1000 then kw.designed / 1000.0 else kw.designed end, c.osc_35)) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
left join data_map_1.dm_pb_11_data ins on ins.project_id = p.project_id and ins.main = true  -- main Installation block
left join data_map_1.dm_pb_5_data sr on sr.project_id = p.project_id and sr.main = true  -- main Scope Review
left join phoenix.list_value lv_ds on cast(lv_ds.id as varchar) = cast(sr.osc_916 as varchar)
cross join lateral (select
    cast(nullif(cast(ins.osc_1349 as varchar), '') as numeric) as installed,
    cast(nullif(regexp_replace(lv_ds.list_value, '[^0-9.]', '', 'g'), '') as numeric) as designed) kw
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • QuickSight's own dataset reads the designed size as a list-value id, not kW, so its figure is wrong wherever a project has a designed size and no installed size; Lumen and this SQL read the value.

Net kW (True Size)

Executive Dashboard Sales: Sales by State (Net kW) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Net kW

Definition: Gross kW (True Size) for net sales only.

SQL
select sum(coalesce(case when kw.installed > 1000 then kw.installed / 1000.0 else kw.installed end,
    case when kw.designed > 1000 then kw.designed / 1000.0 else kw.designed end, c.osc_35)) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
left join data_map_1.dm_pb_11_data ins on ins.project_id = p.project_id and ins.main = true  -- main Installation block
left join data_map_1.dm_pb_5_data sr on sr.project_id = p.project_id and sr.main = true  -- main Scope Review
left join phoenix.list_value lv_ds on cast(lv_ds.id as varchar) = cast(sr.osc_916 as varchar)
cross join lateral (select
    cast(nullif(cast(ins.osc_1349 as varchar), '') as numeric) as installed,
    cast(nullif(regexp_replace(lv_ds.list_value, '[^0-9.]', '', 'g'), '') as numeric) as designed) kw
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Same designed-size caveat as Gross kW.

Avg. Sale Price (Gross Sales)

Executive Dashboard Sales: Gross Sales tile · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Average package price

Definition: Average package price of residential projects sold in the range.

SQL
select avg(c.osc_28) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Projects with no price are left out of the average.

Avg. Sale Price (Net Sales)

Executive Dashboard Sales: Net Sales tile · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Average net package price

Definition: Average package price of residential net sales in the range.

SQL
select avg(c.osc_28) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_660::date between :start_date and :end_date

Pitfalls: None beyond the report's rules.

Avg System Size (Gross Sales)

Executive Dashboard Sales: Gross Sales tile · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Average kW sold

Definition: Average contracted kW of residential projects sold in the range.

SQL
select avg(c.osc_35) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls: None beyond the report's rules.

Avg System Size (Net Sales)

Executive Dashboard Sales: Net Sales tile · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Average net kW

Definition: Average contracted kW of residential net sales in the range.

SQL
select avg(c.osc_35) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_660::date between :start_date and :end_date

Pitfalls: None beyond the report's rules.

Avg. PPW (Gross Sales)

Executive Dashboard Sales: Gross Sales tile; Sales by Month; Sales by Company, Office (Net PPW) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Price per watt; net PPW

Definition: Average net price per watt of residential projects sold in the range.

SQL
select avg(c.osc_30) as value  -- Net PPW
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • A simple average of each project's PPW, not total price ÷ total watts, so small systems weigh as much as large ones.

Avg. PPW (Net Sales)

Executive Dashboard Sales: Net Sales tile · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Net price per watt (net sales)

Definition: Average net PPW of residential net sales in the range.

SQL
select avg(c.osc_30) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Simple average, as above.

Self Gen

Executive Dashboard Sales: Closer Leaderboard (Self Gen) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Self-generated sales

Definition: Residential projects sold in the range whose setter is also the closer.

SQL
select sum(case when upper(coalesce(nullif(trim(nullif(concat(su.first_name, ' ', su.last_name), ' ')), ''), trim(osc_837)))
    = upper(coalesce(nullif(trim(nullif(concat(cu.first_name, ' ', cu.last_name), ' ')), ''), trim(osc_897))) then 1 else 0 end) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
left join data_map_1.dm_pb_11_data ins on ins.project_id = p.project_id and ins.main = true  -- main Installation block
left join data_map_1.dm_pb_5_data sr on sr.project_id = p.project_id and sr.main = true  -- main Scope Review
left join phoenix.list_value lv_ds on cast(lv_ds.id as varchar) = cast(sr.osc_916 as varchar)
left join phoenix.project_owner spo on spo.project_id = p.project_id and spo.owner_type_assignment_id = 2 and spo.archived = false  -- setter
left join phoenix.user_position sup on sup.id = spo.user_position_id
left join phoenix."user" su on su.id = sup.user_id
left join phoenix.project_owner cpo on cpo.project_id = p.project_id and cpo.owner_type_assignment_id = 3 and cpo.archived = false  -- closer
left join phoenix.user_position cup on cup.id = cpo.user_position_id
left join phoenix."user" cu on cu.id = cup.user_id
cross join lateral (select
    cast(nullif(cast(ins.osc_1349 as varchar), '') as numeric) as installed,
    cast(nullif(regexp_replace(lv_ds.list_value, '[^0-9.]', '', 'g'), '') as numeric) as designed) kw
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Setter and closer are the project owners, else the names typed on the contract (OSC 837, 897), compared in capitals.
  • On the leaderboards, Michael Lowry's own closes have no closer, so they never count as self gen.

Avg Days Sale - Perfect Packet

Executive Dashboard Sales: Net Sales tile · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Sale to Deal Review complete

Definition: Average days from sale to Deal Review complete, for residential projects whose Deal Review completed in the range.

SQL
select avg((case when p.osc_687 < date '2010-01-01' then null else p.osc_687 end)::date - (case when p.osc_660 < date '2010-01-01' then null else p.osc_660 end)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_687::date between :start_date and :end_date

Pitfalls:

  • Sits under Net Sales but is dated by the Deal Review date and counts canceled projects too.
  • "Perfect Packet" means Deal Review complete (Project Closed, OSC 687).

Gross Sales, All Types (#)

Executive Dashboard Sales: Sales by Type (Gross Sales) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Sales by type

Definition: Projects of every type sold in the range: Residential by Project Submitted, Roof and R&R by their R&R sold date.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and case when p.object_type_id = 7 then coalesce(p.osc_2929, p.osc_2458, p.osc_660) else p.osc_660 end::date between :start_date and :end_date

Pitfalls:

  • Battery Only and every other type counts here, unlike the Residential tiles.

Net Sales, All Types (#)

Executive Dashboard Sales: Sales by Type (Net Sales) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Net sales by type

Definition: Projects of every type sold in the range and not canceled.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and case when p.object_type_id = 7 then coalesce(p.osc_2929, p.osc_2458, p.osc_660) else p.osc_660 end::date between :start_date and :end_date

Pitfalls: None beyond the report's rules.

Roof Sales

Executive Dashboard Sales: Battery Only, Roof and R&R Sales · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Reroof sales

Definition: Roof / R&R projects with Reroof scope sold in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 7
  and exists (select 1 from phoenix.list_value lv where lv.list_value ilike '%Reroof%'
      and ',' || trim(both '{}' from cast(p.osc_2319 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%')  -- R&R Project Scope
  and case when p.object_type_id = 7 then coalesce(p.osc_2929, p.osc_2458, p.osc_660) else p.osc_660 end::date between :start_date and :end_date

Pitfalls:

  • A job with both Reroof and Removal scope counts in Roof and in R&R. Same rule as the Weekly KPI Report's row 1c.

R&R Sales

Executive Dashboard Sales: Battery Only, Roof and R&R Sales · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Removal & Reinstall sales

Definition: Roof / R&R projects with Removal & Reinstall scope sold in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 7
  and exists (select 1 from phoenix.list_value lv where lv.list_value ilike 'Removal%'
      and ',' || trim(both '{}' from cast(p.osc_2319 as varchar)) || ',' like '%,' || cast(lv.id as varchar) || ',%')
  and case when p.object_type_id = 7 then coalesce(p.osc_2929, p.osc_2458, p.osc_660) else p.osc_660 end::date between :start_date and :end_date

Pitfalls:

  • Overlaps Roof Sales on combined jobs.

Battery Only Sales

Executive Dashboard Sales: Battery Only, Roof and R&R Sales · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Battery sales

Definition: Battery Only projects sold in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 23
  and p.osc_660::date between :start_date and :end_date

Pitfalls: None beyond the report's rules.

Sale to Perfect Packet: Average Days by Sale Date

Executive Dashboard Sales: Sales Recruiting Timelines; Avg Days Between Milestones · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Sale to Perfect Packet

Definition: Average days from sale to Deal Review complete, for residential projects sold in the range.

SQL
select avg((case when p.osc_687 < date '2010-01-01' then null else p.osc_687 end)::date - (case when p.osc_660 < date '2010-01-01' then null else p.osc_660 end)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Dated by the sale date, so a recent range only includes the fastest projects, those that already reached the end milestone. Compare with the Installs and PTO sheets' versions, which are dated by the end milestone.
  • An average, not a median, so a few very old projects pull it up.

Perfect Packet to Work Started: Average Days by Sale Date

Executive Dashboard Sales: Sales Recruiting Timelines; Avg Days Between Milestones · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Perfect Packet to Work Started

Definition: Average days from Deal Review complete to work started, for residential projects sold in the range.

SQL
select avg((p.osc_669)::date - (case when p.osc_687 < date '2010-01-01' then null else p.osc_687 end)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Dated by the sale date, so a recent range only includes the fastest projects, those that already reached the end milestone. Compare with the Installs and PTO sheets' versions, which are dated by the end milestone.
  • An average, not a median, so a few very old projects pull it up.

Work Started to IV: Average Days by Sale Date

Executive Dashboard Sales: Sales Recruiting Timelines; Avg Days Between Milestones · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Work Started to IV

Definition: Average days from work started to install verified, for residential projects sold in the range.

SQL
select avg((p.osc_671)::date - (p.osc_669)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Dated by the sale date, so a recent range only includes the fastest projects, those that already reached the end milestone. Compare with the Installs and PTO sheets' versions, which are dated by the end milestone.
  • An average, not a median, so a few very old projects pull it up.

Sale to IV: Average Days by Sale Date

Executive Dashboard Sales: Sales Recruiting Timelines; Clean vs Dirty Timelines; Avg Days Between Milestones · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Sale to IV

Definition: Average days from sale to install verified, for residential projects sold in the range.

SQL
select avg((p.osc_671)::date - (case when p.osc_660 < date '2010-01-01' then null else p.osc_660 end)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Dated by the sale date, so a recent range only includes the fastest projects, those that already reached the end milestone. Compare with the Installs and PTO sheets' versions, which are dated by the end milestone.
  • An average, not a median, so a few very old projects pull it up.

IV to PTO Approved: Average Days by Sale Date

Executive Dashboard Sales: Sales Recruiting Timelines; Avg Days Between Milestones · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: IV to PTO Approved

Definition: Average days from install verified to PTO approved, for residential projects sold in the range.

SQL
select avg((p.osc_676)::date - (p.osc_671)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Dated by the sale date, so a recent range only includes the fastest projects, those that already reached the end milestone. Compare with the Installs and PTO sheets' versions, which are dated by the end milestone.
  • An average, not a median, so a few very old projects pull it up.

Sale to PTO: Average Days by Sale Date

Executive Dashboard Sales: Clean vs Dirty Timelines; Avg Days Between Milestones · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Sale to PTO

Definition: Average days from sale to PTO approved, for residential projects sold in the range.

SQL
select avg((p.osc_676)::date - (case when p.osc_660 < date '2010-01-01' then null else p.osc_660 end)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Dated by the sale date, so a recent range only includes the fastest projects, those that already reached the end milestone. Compare with the Installs and PTO sheets' versions, which are dated by the end milestone.
  • An average, not a median, so a few very old projects pull it up.

Perfect Packet to Install: Average Days by Sale Date

Executive Dashboard Sales: Clean vs Dirty Timelines · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Perfect Packet to Install

Definition: Average days from Deal Review complete to install verified, for residential projects sold in the range.

SQL
select avg((p.osc_671)::date - (case when p.osc_687 < date '2010-01-01' then null else p.osc_687 end)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Dated by the sale date, so a recent range only includes the fastest projects, those that already reached the end milestone. Compare with the Installs and PTO sheets' versions, which are dated by the end milestone.
  • An average, not a median, so a few very old projects pull it up.

M1 Approved to M1 Paid: Average Days by Sale Date

Executive Dashboard Sales: Sales Recruiting Timelines · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: M1 Approved to M1 Paid

Definition: Average days from M1 approved to M1 funds received, for residential projects sold in the range.

SQL
select avg((p.osc_683)::date - (p.osc_682)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Dated by the sale date, so a recent range only includes the fastest projects, those that already reached the end milestone. Compare with the Installs and PTO sheets' versions, which are dated by the end milestone.
  • An average, not a median, so a few very old projects pull it up.

Perfect Packet to PTO: Average Days by Sale Date

Executive Dashboard Sales: Clean vs Dirty Timelines · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Perfect Packet - PTO

Definition: Average days from Deal Review complete to PTO approved, for residential projects sold in the range.

SQL
select avg(case when (p.osc_676)::date - (case when p.osc_687 < date '2010-01-01' then null else p.osc_687 end)::date < 0 then 0 else (p.osc_676)::date - (case when p.osc_687 < date '2010-01-01' then null else p.osc_687 end)::date end) as value  -- PTO before Deal Review counts as 0
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Dated by sale date (see the other timelines).
  • A PTO dated before the Deal Review counts as 0 days.

IV to M1 Approved: Average Days by Sale Date

Executive Dashboard Sales: Sales Recruiting Timelines; Avg Days Between Milestones · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: IV to M1 Approved

Definition: Average days from install verified to M1 approved, for residential projects sold in the range.

SQL
select avg(case when p.osc_682::date > p.osc_671::date then (p.osc_682)::date - (p.osc_671)::date
             when p.osc_682::date < p.osc_671::date then 0 end) as value  -- M1 before IV counts as 0; same day is left out
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_type_id = 6  -- Residential
  and p.osc_660::date between :start_date and :end_date

Pitfalls:

  • Copies a QuickSight quirk: M1 approved before install counts as 0 days, and M1 approved the same day as install is left out of the average entirely.
  • Dated by sale date.

Install Verified (All Types)

Executive Dashboard Installs: Total Install Verifieds tile; YoY Verified Installations; Total Verified Installations; breakdowns by Warehouse, Financier and State · target none
Executive Dashboard Monthly Goals: Install Verified · target 125 a month
Executive Dashboard TV Dashboard: YoY Verified Installations · target none

Also called: Total Install Verifieds; installs verified; IV

Definition: Projects of every type whose install was verified in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_671::date between :start_date and :end_date

Pitfalls:

  • Every project type, so it's higher than the Weekly KPI Report's Install Verified (Residential solar, row 10).

Install Work Started

Executive Dashboard Installs: Total Install Work Started tile · target none
Procurement Daily Material Cost: Installs Started tile; Cost per Watt and Coverage by Month periods; Cost per Watt by State board, Installs · target none

Also called: Installs started

Definition: Projects of every type whose install work started in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_669::date between :start_date and :end_date

Pitfalls:

  • Installation Started (OSC 669) keeps the first visit's date; return visits don't count again.

Installed kW (True Size)

Executive Dashboard Installs: Installed kW tile · target none

Also called: Installed kW

Definition: Total system size of projects verified in the range, installed size where known, else designed, else contract.

SQL
select sum(coalesce(case when kw.installed > 1000 then kw.installed / 1000.0 else kw.installed end,
    case when kw.designed > 1000 then kw.designed / 1000.0 else kw.designed end, c.osc_35)) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
left join data_map_1.dm_pb_11_data ins on ins.project_id = p.project_id and ins.main = true  -- main Installation block
left join data_map_1.dm_pb_5_data sr on sr.project_id = p.project_id and sr.main = true  -- main Scope Review
left join phoenix.list_value lv_ds on cast(lv_ds.id as varchar) = cast(sr.osc_916 as varchar)
cross join lateral (select
    cast(nullif(cast(ins.osc_1349 as varchar), '') as numeric) as installed,
    cast(nullif(regexp_replace(lv_ds.list_value, '[^0-9.]', '', 'g'), '') as numeric) as designed) kw
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_671::date between :start_date and :end_date

Pitfalls:

  • Not the Weekly KPI Report's kW Installed (row 11), which is solar only with no contract fallback.
  • Same designed-size caveat as Gross kW.

Installed kW (Contract)

Executive Dashboard Installs: YoY Installed kW; System Size kW by State by Month · target none

Also called: Installed kW (contract)

Definition: Total contracted kW of projects verified in the range.

SQL
select sum(c.osc_35) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_671::date between :start_date and :end_date

Pitfalls:

  • The tile above the chart uses True Size, the chart uses contract kW.

Installed Package Price

Executive Dashboard Installs: Installed Package Price tile · target none

Also called: Installed revenue

Definition: Total package price of projects verified in the range.

SQL
select sum(c.osc_28) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_671::date between :start_date and :end_date

Pitfalls: None beyond the report's rules.

Fundable Installs (IV to M1 ≤ 7 Days)

Executive Dashboard Installs: Total Fundable Installs (IV to M1 < 1WK) tile · target none

Also called: Total Fundable Installs (IV to M1 < 1WK)

Definition: Projects verified in the range whose M1 was approved within 7 days of install.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_671::date between :start_date and :end_date
  and p.osc_682::date - p.osc_671::date <= 7  -- M1 approved within a week

Pitfalls:

  • M1 approved before install also counts.
  • The title says "< 1 week" but 7 days counts. The Executive Funding sheet's Fundable Installs uses 14 days and is dated by the M1 approval (Conflict 26).

Sale to IV: Average Days by IV Date

Executive Dashboard Installs: Average Days Sale - Install tile; Avg Days Sale to Installation Verified; breakdowns by Warehouse, Financier and State · target none
Executive Dashboard TV Dashboard: Avg Days Sale to Installation Verified · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Average Days Sale - Install

Definition: Average days from sale to install verified, for projects of every type verified in the range.

SQL
select avg((p.osc_671)::date - (case when p.osc_660 < date '2010-01-01' then null else p.osc_660 end)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_671::date between :start_date and :end_date

Pitfalls:

  • An average of calendar days; the Weekly KPI Report's cycle times are medians over Residential solar only (Conflict 33).

Work Started to IV: Average Days by IV Date

Executive Dashboard Installs: Average Days Work Started - Install Verified tile · target none

Also called: Average Days Work Started - Install Verified

Definition: Average days from work started to install verified, for projects of every type verified in the range.

SQL
select avg((p.osc_671)::date - (p.osc_669)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_671::date between :start_date and :end_date

Pitfalls:

  • An average of calendar days; the Weekly KPI Report's cycle times are medians over Residential solar only (Conflict 33).

Perfect Packet to IV: Average Days by IV Date

Executive Dashboard Installs: Avg Days Sale to Installation Verified (second line) · target none

Sale date: Closed (OSC 687), the day the project Sold.

Also called: Avg Days Perfect Packet to IV

Definition: Average days from Deal Review complete to install verified, for projects of every type verified in the range.

SQL
select avg((p.osc_671)::date - (case when p.osc_687 < date '2010-01-01' then null else p.osc_687 end)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_671::date between :start_date and :end_date

Pitfalls:

  • An average of calendar days; the Weekly KPI Report's cycle times are medians over Residential solar only (Conflict 33).

PTO Submitted (All Types)

Executive Dashboard PTO: PTO Submitted tile · target none

Also called: PTOs submitted

Definition: Projects of every type whose PTO was submitted in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_675::date between :start_date and :end_date

Pitfalls: None beyond the report's rules.

PTO Approved (All Types)

Executive Dashboard PTO: PTO Approved tile; PTO Approved by Date · target none
Executive Dashboard Monthly Goals: PTO Approved · target 160 a month

Also called: PTOs approved; PTO

Definition: Projects of every type whose PTO was approved in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_676::date between :start_date and :end_date

Pitfalls:

  • Every type; the Weekly KPI Report's PTO Approved (row 14) is Residential solar only.

PTO Approved Package Price

Executive Dashboard PTO: Total Package Price PTO Approved tile · target none

Also called: Total Package Price PTO Approved

Definition: Total package price of projects PTO approved in the range.

SQL
select sum(c.osc_28) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_676::date between :start_date and :end_date

Pitfalls: None beyond the report's rules.

Sale to PTO: Average Days by PTO Date

Executive Dashboard PTO: Sale to PTO Approved tile; Avg Days to PTO by Week · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Sale to PTO Approved

Definition: Average days from sale to PTO approved, for projects of every type PTO approved in the range.

SQL
select avg((p.osc_676)::date - (case when p.osc_660 < date '2010-01-01' then null else p.osc_660 end)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_676::date between :start_date and :end_date

Pitfalls:

  • Average calendar days, every project type.

IV to PTO: Average Days by PTO Date

Executive Dashboard PTO: Install Verified to PTO Approved tile; Avg Days to PTO by Week · target none

Also called: Install Verified to PTO Approved

Definition: Average days from install verified to PTO approved, for projects of every type PTO approved in the range.

SQL
select avg((p.osc_676)::date - (p.osc_671)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_676::date between :start_date and :end_date

Pitfalls:

  • Average calendar days, every project type.

Inspections Passed to PTO: Average Days by PTO Date

Executive Dashboard PTO: All Inspections Passed to PTO Approved tile · target none

Also called: All Inspections Passed to PTO Approved

Definition: Average days from all inspections passed to PTO approved, for projects of every type PTO approved in the range.

SQL
select avg((p.osc_676)::date - (p.osc_674)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_676::date between :start_date and :end_date

Pitfalls:

  • Average calendar days, every project type.

Perfect Packet to PTO: Average Days by PTO Date

Executive Dashboard PTO: Avg Days to PTO by Week · target none

Sale date: Closed (OSC 687), the day the project Sold.

Also called: Perfect Packet to PTO

Definition: Average days from Deal Review complete to PTO approved, for projects PTO approved in the range.

SQL
select avg(case when (p.osc_676)::date - (case when p.osc_687 < date '2010-01-01' then null else p.osc_687 end)::date < 0 then 0 else (p.osc_676)::date - (case when p.osc_687 < date '2010-01-01' then null else p.osc_687 end)::date end) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_676::date between :start_date and :end_date

Pitfalls:

  • A PTO dated before the Deal Review counts as 0 days.

Deal Review to PTO Within 73 Days (%)

Executive Dashboard PTO: Deal Review to PTO, Within 73 Days (%) · target none

Sale date: Closed (OSC 687), the day the project Sold.

Also called: Within 73 Days (%); Deal Review to PTO SLA

Definition: Of net sales whose Deal Review completed in the range and that have PTO, the share approved within 73 days of the Deal Review.

SQL
select sum(case when (p.osc_676)::date - (p.osc_687)::date <= 73 then 1 else 0 end)::numeric / nullif(count(*), 0) as value,
  sum(case when (p.osc_676)::date - (p.osc_687)::date <= 73 then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_676 is not null
  and p.osc_687::date between :start_date and :end_date

Pitfalls:

  • Dated by the Deal Review date, not the PTO date, so a recent range only holds the projects that already have PTO and always looks good. 73 days is the Sr Staff report's SLA.

Deal Review to PTO Within 73 Days (#)

Executive Dashboard PTO: Within 73 Days (#) · target none

Sale date: Closed (OSC 687), the day the project Sold.

Also called: Within 73 Days (#)

Definition: Net sales with Deal Review in the range and PTO approved within 73 days of it.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_687::date between :start_date and :end_date
  and (p.osc_676)::date - (p.osc_687)::date <= 73

Pitfalls:

  • Same dating as the % version.

Deal Review to PTO Over 73 Days (#)

Executive Dashboard PTO: Over 73 Days (#) · target none

Sale date: Closed (OSC 687), the day the project Sold.

Also called: Over 73 Days (#)

Definition: Net sales with Deal Review in the range and PTO approved more than 73 days after it.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_687::date between :start_date and :end_date
  and (p.osc_676)::date - (p.osc_687)::date > 73

Pitfalls:

  • Projects still waiting on PTO aren't counted, however late they are.

Deal Review to PTO: Median Days

Executive Dashboard PTO: P50 · target none

Sale date: Closed (OSC 687), the day the project Sold.

Also called: P50

Definition: Median days from Deal Review complete to PTO approved, for net sales with Deal Review in the range and PTO approved.

SQL
select percentile_cont(0.5) within group (order by (p.osc_676)::date - (p.osc_687)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_676 is not null
  and p.osc_687::date between :start_date and :end_date

Pitfalls:

  • Dated by Deal Review: dating by PTO instead moved the median from 96 to 144 days (2026-11-30), because last year's backlog then counts.

Deal Review to PTO: 75th Percentile Days

Executive Dashboard PTO: P75 · target none

Sale date: Closed (OSC 687), the day the project Sold.

Also called: P75

Definition: 75th percentile of days from Deal Review complete to PTO approved, for the same projects as the median.

SQL
select percentile_cont(0.75) within group (order by (p.osc_676)::date - (p.osc_687)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_676 is not null
  and p.osc_687::date between :start_date and :end_date

Pitfalls: None beyond the report's rules.

NTP Approved (All Types)

Executive Dashboard Monthly Goals: NTP · target 200 a month

Also called: M0 Approved; notice to proceed

Definition: Projects of every type where M0 (NTP) was approved in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_680::date between :start_date and :end_date

Pitfalls:

  • Counts every project type and no test accounts.
  • M0 (NTP) Approved keeps the first approval; resolving stips doesn't change it.

Scope Review Completed

Executive Dashboard Monthly Goals: Scope Review · target 150 a month

Also called: Scope reviews

Definition: Projects of every type where Scope Review was completed in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_661::date between :start_date and :end_date

Pitfalls:

  • Counts every project type and no test accounts.

Plan Set Created (All Types)

Executive Dashboard Monthly Goals: Plan Set · target 150 a month

Also called: Plan sets

Definition: Projects of every type where the plan set was created in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_662::date between :start_date and :end_date

Pitfalls:

  • Counts every project type and no test accounts.
  • Keeps the first plan set's date; revisions don't count again.

All Permits Approved (All Types)

Executive Dashboard Monthly Goals: Permits Approved · target 80 a month

Also called: Permits approved

Definition: Projects of every type where all permits were approved in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_666::date between :start_date and :end_date

Pitfalls:

  • Counts every project type and no test accounts.
  • Keeps the first date.

NEM Approved (All Types)

Executive Dashboard Monthly Goals: NEM Approved · target 120 a month

Also called: NEM approvals

Definition: Projects of every type where NEM was approved in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_1117::date between :start_date and :end_date

Pitfalls:

  • Counts every project type and no test accounts.
  • Keeps the first date: the button is repeatable but doesn't overwrite.

M1 Approved (All Types)

Executive Dashboard Monthly Goals: M1 Approvals · target 200 a month

Also called: M1 approvals

Definition: Projects of every type where M1 was approved (project-level date) in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_682::date between :start_date and :end_date

Pitfalls:

  • Counts every project type and no test accounts.
  • Project-level date with no cash-deal fallback, unlike the Weekly KPI Report's row 16.

All Inspections Passed (All Types)

Executive Dashboard Monthly Goals: All Inspections Passed · target 350 a month

Also called: Inspections passed

Definition: Projects of every type where all inspections passed (OSC 674) in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_674::date between :start_date and :end_date

Pitfalls:

  • Counts every project type and no test accounts.
  • No fallback to the inspection appointment, unlike the Weekly KPI Report's row 12.

M2 Approved (All Types)

Executive Dashboard Monthly Goals: M2 Approved · target 180 a month

Also called: M2 approvals

Definition: Projects of every type where M2 was approved (project-level date) in the range.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_685::date between :start_date and :end_date

Pitfalls:

  • Counts every project type and no test accounts.

Sold This Year, PTO Approved

Executive Dashboard Sales PTO: Project Count · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Project Count

Definition: Projects sold and install verified this calendar year whose PTO was approved in the range (this month to date by default).

SQL
select count(distinct p.project_id) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_676::date between :start_date and :end_date
  and date_trunc('year', p.osc_660) = date_trunc('year', current_date) and p.osc_660 <= current_date
  and date_trunc('year', p.osc_671) = date_trunc('year', current_date) and p.osc_671 <= current_date

Pitfalls:

  • "This year" is fixed to the current calendar year, whatever range you pick.

Sold This Year, PTO Approved kW

Executive Dashboard Sales PTO: Total System Size kW · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Total System Size kW

Definition: Total system size (True Size) of the same projects.

SQL
select sum(coalesce(case when kw.installed > 1000 then kw.installed / 1000.0 else kw.installed end,
    case when kw.designed > 1000 then kw.designed / 1000.0 else kw.designed end, c.osc_35)) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true  -- main contract
left join data_map_1.dm_pb_11_data ins on ins.project_id = p.project_id and ins.main = true  -- main Installation block
left join data_map_1.dm_pb_5_data sr on sr.project_id = p.project_id and sr.main = true  -- main Scope Review
left join phoenix.list_value lv_ds on cast(lv_ds.id as varchar) = cast(sr.osc_916 as varchar)
cross join lateral (select
    cast(nullif(cast(ins.osc_1349 as varchar), '') as numeric) as installed,
    cast(nullif(regexp_replace(lv_ds.list_value, '[^0-9.]', '', 'g'), '') as numeric) as designed) kw
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_676::date between :start_date and :end_date
  and date_trunc('year', p.osc_660) = date_trunc('year', current_date) and p.osc_660 <= current_date
  and date_trunc('year', p.osc_671) = date_trunc('year', current_date) and p.osc_671 <= current_date

Pitfalls: None beyond the report's rules.

Gross Sales vs Forecast (Actuals)

Executive Dashboard Sales: Residential Solar Gross Sales Forecast vs Actuals · target the month's forecast
Executive Dashboard TV Dashboard: Gross Sales Forecast vs Actuals · target the month's forecast

Sale date: contract signed (the main contract's OSC 23), neither Submitted nor Closed. See Sale dates.

Also called: Gross Sales (forecast chart)

Definition: Residential contracts signed each month from 2026, plotted against the sales forecast.

SQL
select date_trunc('month', c.osc_23)::date as month, count(*) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.object_type_id = 6
  and c.osc_23 >= date '2026-01-01'  -- the contract's signed date
group by 1
order by 1

Pitfalls:

  • Dated by the main contract's signed date (OSC 23), not Project Submitted like Gross Sales (#), so the two can differ for the same month.
  • The forecast itself is a fixed table, not in Albatross: 2026 monthly totals were read off QuickSight's chart on 2026-11-06 (Lumen executive/salesForecast.ts). A State filter doesn't narrow the forecast.

Net Sales vs Forecast (Actuals)

Executive Dashboard Sales: Residential Solar Net Sales Forecast vs Actuals · target 55% of the month's forecast
Executive Dashboard TV Dashboard: Net Sales Forecast vs Actuals · target 55% of the month's forecast

Sale date: contract signed (the main contract's OSC 23), neither Submitted nor Closed. See Sale dates.

Also called: Net Sales (forecast chart)

Definition: Residential contracts signed each month from 2026 that aren't canceled or on hold, against 55% of the sales forecast.

SQL
select date_trunc('month', c.osc_23)::date as month, count(*) as value
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0
  and p.object_type_id = 6
  and c.osc_23 >= date '2026-01-01'
  and p.object_status_id not in (34, 58, 59)  -- not On Hold, Cancellation in Progress or Canceled
group by 1
order by 1

Pitfalls:

  • Leaves out On Hold projects as well as canceled ones; Net Sales (#) on the same sheet counts On Hold. The two net figures won't match.

M1 Submitted (Executive)

Executive Dashboard Funding: M1 Submitted tile · target none

Also called: M1 Submitted; em1.submitted

Definition: Projects with an M1 package submitted to the financier in the range.

SQL
select count(distinct n.project_id) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1160::date between :start_date and :end_date

Pitfalls:

  • Counts distinct projects, not blocks. A project submitted twice in the range counts once.
  • Dated by the block's M1 Submitted (PB 26, OSC 1160), not the project's M1 Submitted milestone.
  • Every project type, archived projects included. The Funding Dashboard counts blocks instead.
  • QuickSight's State filter excludes blanks, so it drops blocks on archived projects (they have no state in its projects dataset); Lumen and this SQL keep them, so Lumen can run higher.

M1 Approved (Executive)

Executive Dashboard Funding: M1 Approved tile · target none

Also called: M1 Approved; em1.approved

Definition: Projects with an M1 package approved in the range.

SQL
select count(distinct n.project_id) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1161::date between :start_date and :end_date

Pitfalls:

  • Counts distinct projects, not blocks.
  • Dated by the block's M1 Approved (OSC 1161). The Executive Dashboard's M1 Approved (All Types) on the project sheets uses the project's M1 Approved milestone (OSC 682) instead, so the two can differ.
  • QuickSight's State filter excludes blanks, so it drops blocks on archived projects (they have no state in its projects dataset); Lumen and this SQL keep them, so Lumen can run higher.

M1 Funds Received (Executive)

Executive Dashboard Funding: M1 Funds Received tile · target none

Also called: M1 Funds Received; M1 Paid; em1.fundsReceived

Definition: Projects whose M1 funds were received in the range.

SQL
select count(distinct n.project_id) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_683::date between :start_date and :end_date

Pitfalls:

  • Dated by the project's M1 Funds Received milestone (OSC 683). QuickSight's tile names a column both of its datasets carry (the block's OSC 1162 and the project's OSC 683); Lumen reads the project's.
  • Only projects with at least one M1 block count.
  • QuickSight's State filter excludes blanks, so it drops blocks on archived projects (they have no state in its projects dataset); Lumen and this SQL keep them, so Lumen can run higher.

Fundable Installs (IV to M1 Approved ≤ 14 Days)

Executive Dashboard Funding: Total Fundable Installs (IV to M1 < 2WK) tile · target none

Also called: Total Fundable Installs (IV to M1 < 2 Wk); fundable_installs; em1.fundableInstalls

Definition: M1 blocks approved in the range within 14 calendar days of the project's Installation Verified.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1161::date between :start_date and :end_date
  and n.osc_1161::date - p.osc_671::date <= 14  -- Installation Verified (OSC 671) to M1 Approved

Pitfalls:

  • Counts blocks, not projects.
  • 14 calendar days, both ends not counted (approved minus verified ≤ 14). An approval dated before the install was verified counts as fundable.
  • Not the Installs sheet's Fundable Installs (IV to M1 ≤ 7 Days), which uses 7 days and the project's milestones.

Fundable Installs % (IV to M1 Approved ≤ 14 Days)

Executive Dashboard Funding: Fundable Installs % (IV to M1 < 2WK) tile · target none

Also called: Fundable Installs % (IV to M1 < 2 Wk); %_fundable_installs; em1.fundableInstallsPct

Definition: Of the M1 blocks approved in the range whose project has an install verified date, the share approved within 14 days of it.

SQL
select count(*) filter (where n.osc_1161::date - p.osc_671::date <= 14)::numeric
    / nullif(count(p.osc_671), 0) as value,
  count(*) filter (where n.osc_1161::date - p.osc_671::date <= 14) as num,
  count(p.osc_671) as den
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1161::date between :start_date and :end_date

Pitfalls:

  • Blocks approved with no Installation Verified date are left off the bottom, not counted as late.

M1 Approval Rate (Executive)

Executive Dashboard Funding: Overall M1 Approval Rate tile; M1 Approval Rate by Date combo (the line) · target none

Also called: Overall M1 Approval Rate; m1_approval_rate; em1.approvalRate

Definition: Of the M1 blocks decided in the range, the share approved. Rejections by the funding team and by the financier both count against it.

SQL
select count(*) filter (where n.osc_1161::date between :start_date and :end_date)::numeric / nullif(count(*) filter (where n.osc_1161::date between :start_date and :end_date) + count(*) filter (where n.osc_1468::date between :start_date and :end_date), 0) as value,
  count(*) filter (where n.osc_1161::date between :start_date and :end_date) as num, count(*) filter (where n.osc_1161::date between :start_date and :end_date) + count(*) filter (where n.osc_1468::date between :start_date and :end_date) as den
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1468, n.osc_1161)::date between :start_date and :end_date  -- M1 Date: the rejected date, else the approved date

Pitfalls:

  • An approval or rejection counts only when its own date falls in the range. A block rejected in the range and approved after it counts as a rejection only.
  • Counts every rejection, the funding team's included. The Funding Dashboard's M1 Financier Pass Rate counts only the financier's, so it runs much higher.
  • Counts blocks, resubmissions included.

M1 First Time Approval Rate (Executive)

Executive Dashboard Funding: 1st Time M1 Approval Rate tile · target none

Also called: 1st Time M1 Approval Rate; em1.firstTimeApprovalRate

Definition: M1 Approval Rate over each project's first M1 block only.

SQL
select count(*) filter (where n.osc_1161::date between :start_date and :end_date)::numeric / nullif(count(*) filter (where n.osc_1161::date between :start_date and :end_date) + count(*) filter (where n.osc_1468::date between :start_date and :end_date), 0) as value,
  count(*) filter (where n.osc_1161::date between :start_date and :end_date) as num, count(*) filter (where n.osc_1161::date between :start_date and :end_date) + count(*) filter (where n.osc_1468::date between :start_date and :end_date) as den
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1468, n.osc_1161)::date between :start_date and :end_date  -- M1 Date
  and not exists (select 1 from data_map_1.dm_pb_26_data e  -- the project's first M1 block
    where e.project_id = n.project_id and e.date_created < n.date_created)

Pitfalls:

  • "First" is the project's first M1 block by creation date (Block Instance = 1), whether or not it was ever submitted. The Funding Dashboard's First Time Financier Pass Rate uses each project's first submission instead.

M1 Financier Approval Rate (Executive)

Executive Dashboard Funding: Financier M1 Approval Rate tile · target none

Also called: Financier M1 Approval Rate; m1_financier_approval_rate; em1.financierApprovalRate

Definition: Of the M1 blocks decided in the range, approved ones over approved plus those the financier rejected.

SQL
select count(n.osc_1161)::numeric / nullif(count(n.osc_1161) + count(*) filter (where rb.list_value = 'Financier'), 0) as value,
  count(n.osc_1161) as num, count(n.osc_1161) + count(*) filter (where rb.list_value = 'Financier') as den
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.list_value rb on rb.id = n.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1468, n.osc_1161)::date between :start_date and :end_date  -- M1 Date: the rejected date, else the approved date

Pitfalls:

  • Rows are picked by M1 Date, but the top counts any approved date, even one after the range.
  • A block with both an approved date and a financier rejection counts twice on the bottom.
  • QuickSight's first-submission filter on this tile is turned off, so all submissions count.

M1 Internal Approval Rate (Executive)

Executive Dashboard Funding: Internal M1 Approval Rate tile · target none

Also called: Internal M1 Approval Rate; m1_internal_approval_rate; em1.internalApprovalRate

Definition: Of the M1 packages through the funding team's internal check, the share sent on to the financier rather than sent back.

SQL
select count(n.osc_1160)::numeric / nullif(count(n.osc_1160) + count(*) filter (where (n.osc_1468 is not null and rb.list_value = 'Funding Team')), 0) as value,
  count(n.osc_1160) as num, count(n.osc_1160) + count(*) filter (where (n.osc_1468 is not null and rb.list_value = 'Funding Team')) as den
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.list_value rb on rb.id = n.osc_1762  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(case when rb.list_value = 'Funding Team' then n.osc_1468 end, n.osc_1160)::date
    between :start_date and :end_date  -- Internal M1 Date

Pitfalls:

  • Dated by Internal M1 Date: the funding team's rejection date, else the submitted date.
  • A block both submitted and rejected by the funding team counts twice on the bottom. Same formula as the Funding Dashboard's M1 Internal QC Pass Rate.

Sale to M1 Approved: Average Days (Executive Funding)

Executive Dashboard Funding: Sale - M1 Approved tile · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Sale - M1 Approved; sale_to_m1_approved; em1.saleToApproved

Definition: Average calendar days from sale to the block's M1 approval, over blocks approved in the range.

SQL
select avg(n.osc_1161::date - (case p.osc_660::date when date '0001-01-01' then date '1937-01-01'
    when date '0024-06-29' then date '2024-06-29' when date '0024-08-08' then date '2024-08-08'
    when date '0024-08-16' then date '2024-08-16' when date '0024-08-19' then date '2024-08-19'
    else p.osc_660::date end)) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1161::date between :start_date and :end_date

Pitfalls:

  • Dated by the block's approval. Sale is Project Submitted (OSC 660), with placeholder years fixed as the dataset does; placeholder 0001-01-01 becomes 1937-01-01 and stays in the average.

IV to M1 Approved: Average Days (Executive Funding)

Executive Dashboard Funding: Installation to M1 Approved tile · target none

Also called: Installation to M1 Approved; iv_to_m1_approved; em1.ivToApproved

Definition: Average calendar days from install verified to the project's M1 approval, for projects whose M1 was approved in the range.

SQL
select avg(p.osc_682::date - p.osc_671::date) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_682::date between :start_date and :end_date  -- project M1 Approved (OSC 682)
  and p.osc_681::date = (select min(e.osc_1160::date)  -- first submission only
    from data_map_1.dm_pb_26_data e where e.project_id = n.project_id)

Pitfalls:

  • Uses the project's milestones (OSC 671, OSC 682), not the block dates.
  • "First submission only" keeps a project only when its project-level M1 Submitted milestone equals its earliest block submission. A project whose milestone doesn't match drops out entirely (3 of the 246 projects whose M1 was approved in October 2026).
  • Averages over M1 blocks, not projects: the value is project-level, so a project with several M1 blocks counts once per block. In October 2026 the M1 Approved timings averaged 404 blocks on 243 projects.
  • Not the Installs sheet's IV to M1 Approved: Average Days by Sale Date.

Sale to M1 Submitted: Average Days (Executive Funding)

Executive Dashboard Funding: Sale - M1 Submitted tile · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Sale - M1 Submitted; sale_to_m1_submitted; em1.saleToSubmitted

Definition: Average calendar days from sale to each M1 block's submission, for projects whose M1 Submitted milestone falls in the range.

SQL
select avg(n.osc_1160::date - (case p.osc_660::date when date '0001-01-01' then date '1937-01-01'
    when date '0024-06-29' then date '2024-06-29' when date '0024-08-08' then date '2024-08-08'
    when date '0024-08-16' then date '2024-08-16' when date '0024-08-19' then date '2024-08-19'
    else p.osc_660::date end)) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_681::date between :start_date and :end_date  -- project M1 Submitted (OSC 681)

Pitfalls:

  • Rows are picked by the project's M1 Submitted (OSC 681) but measured to each block's own submitted date, so a resubmitted project adds one figure per block.
  • Keeps moving after month-end as new M1 blocks open on the month's projects.

IV to M1 Submitted: Average Working Days (Executive Funding)

Executive Dashboard Funding: Installation to M1 Submitted tile · target none

Also called: Installation to M1 Submitted; iv_to_m1_submitted; em1.ivToSubmitted

Definition: Average working days from install verified to the project's first M1 submission.

SQL
select avg(w.days) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
cross join lateral (select case when p.osc_671::date is null or p.osc_681::date is null then null
    else (case when p.osc_681::date < p.osc_671::date then -1 else 1 end) * count(*) end as days  -- working days, both ends counted
  from generate_series(least(p.osc_671::date, p.osc_681::date), greatest(p.osc_671::date, p.osc_681::date), interval '1 day') g(d)
  where extract(isodow from g.d) < 6) w
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_681::date between :start_date and :end_date  -- project M1 Submitted (OSC 681)
  and p.osc_681::date = (select min(e.osc_1160::date)  -- first submission only
    from data_map_1.dm_pb_26_data e where e.project_id = n.project_id)

Pitfalls:

  • Working days, Monday to Friday with both ends counted; holidays are not skipped. Negative when the submission came before the install was verified.
  • "First submission only" keeps a project only when its project-level M1 Submitted milestone equals its earliest block submission. A project whose milestone doesn't match drops out entirely (3 of the 246 projects whose M1 was approved in October 2026).
  • Averages over M1 blocks, not projects: the value is project-level, so a project with several M1 blocks counts once per block. In October 2026 the M1 Approved timings averaged 404 blocks on 243 projects.

IV to RFF: Average Days

Executive Dashboard Funding: Installation to RFF tile · target none

Also called: Installation to RFF; Installation Verified to Ready for M1 Funding; iv_to_rff; em1.ivToRff

Definition: Average calendar days from install verified to Ready for M1 Funding.

SQL
select avg(ins.osc_1113::date - p.osc_671::date) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join data_map_1.dm_pb_11_data ins on ins.project_id = n.project_id and ins.main = true  -- main Installation block
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and ins.osc_1113::date between :start_date and :end_date  -- Ready for M1 Funding (main Installation block, OSC 1113)
  and p.osc_681::date = (select min(e.osc_1160::date)  -- first submission only
    from data_map_1.dm_pb_26_data e where e.project_id = n.project_id)

Pitfalls:

  • Dated by Ready for M1 Funding, read from the project's main Installation block (PB 11).
  • "First submission only" keeps a project only when its project-level M1 Submitted milestone equals its earliest block submission. A project whose milestone doesn't match drops out entirely (3 of the 246 projects whose M1 was approved in October 2026).
  • Averages over M1 blocks, not projects: the value is project-level, so a project with several M1 blocks counts once per block. In October 2026 the M1 Approved timings averaged 404 blocks on 243 projects.
  • QuickSight's M1 Submitted filter on this tile is turned off.

RFF to M1 Submitted: Average Days

Executive Dashboard Funding: RFF to M1 Submitted tile · target none

Also called: RFF to M1 Submitted; rff_to_m1_submitted; em1.rffToSubmitted

Definition: Average calendar days from Ready for M1 Funding to the project's first M1 submission.

SQL
select avg(p.osc_681::date - ins.osc_1113::date) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join data_map_1.dm_pb_11_data ins on ins.project_id = n.project_id and ins.main = true  -- main Installation block
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_681::date between :start_date and :end_date  -- project M1 Submitted (OSC 681)
  and p.osc_681::date = (select min(e.osc_1160::date)  -- first submission only
    from data_map_1.dm_pb_26_data e where e.project_id = n.project_id)

Pitfalls:

  • "First submission only" keeps a project only when its project-level M1 Submitted milestone equals its earliest block submission. A project whose milestone doesn't match drops out entirely (3 of the 246 projects whose M1 was approved in October 2026).
  • Averages over M1 blocks, not projects: the value is project-level, so a project with several M1 blocks counts once per block. In October 2026 the M1 Approved timings averaged 404 blocks on 243 projects.

RFF to M1 Approved: Average Days

Executive Dashboard Funding: RFF to M1 Approved tile · target none

Also called: RFF to M1 Approved; rff_to_m1_approved; em1.rffToApproved

Definition: Average calendar days from Ready for M1 Funding to the project's M1 approval.

SQL
select avg(p.osc_682::date - ins.osc_1113::date) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join data_map_1.dm_pb_11_data ins on ins.project_id = n.project_id and ins.main = true  -- main Installation block
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_682::date between :start_date and :end_date  -- project M1 Approved (OSC 682)
  and p.osc_681::date = (select min(e.osc_1160::date)  -- first submission only
    from data_map_1.dm_pb_26_data e where e.project_id = n.project_id)

Pitfalls:

  • "First submission only" keeps a project only when its project-level M1 Submitted milestone equals its earliest block submission. A project whose milestone doesn't match drops out entirely (3 of the 246 projects whose M1 was approved in October 2026).
  • Averages over M1 blocks, not projects: the value is project-level, so a project with several M1 blocks counts once per block. In October 2026 the M1 Approved timings averaged 404 blocks on 243 projects.

M1 Submitted to M1 Approved: Average Days

Executive Dashboard Funding: M1 Submitted to M1 Approved tile · target none

Also called: M1 Submitted to M1 Approved; m1_submitted_to_m1_approved; em1.submittedToApproved

Definition: Average calendar days from an M1 block's submission to its approval, for projects whose M1 was approved in the range.

SQL
select avg(n.osc_1161::date - n.osc_1160::date) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_682::date between :start_date and :end_date  -- project M1 Approved (OSC 682)
  and p.osc_681::date = (select min(e.osc_1160::date)  -- first submission only
    from data_map_1.dm_pb_26_data e where e.project_id = n.project_id)

Pitfalls:

  • Rows are picked by the project's M1 Approved milestone; the days are the block's own. Rejected blocks of the same project have no approved date and drop out of the average.
  • "First submission only" keeps a project only when its project-level M1 Submitted milestone equals its earliest block submission. A project whose milestone doesn't match drops out entirely (3 of the 246 projects whose M1 was approved in October 2026).

RFF to M1 Rejected: Average Days

Executive Dashboard Funding: RFF to M1 Rejected tile · target none

Also called: RFF to M1 Rejected; rff_to_m1_rejected; em1.rffToRejected

Definition: Average calendar days from Ready for M1 Funding to an M1 rejection, on projects whose M1 was approved in the range.

SQL
select avg(n.osc_1468::date - ins.osc_1113::date) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join data_map_1.dm_pb_11_data ins on ins.project_id = n.project_id and ins.main = true  -- main Installation block
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_682::date between :start_date and :end_date  -- project M1 Approved (OSC 682), as QuickSight filters it
  and p.osc_681::date = (select min(e.osc_1160::date)  -- first submission only
    from data_map_1.dm_pb_26_data e where e.project_id = n.project_id)

Pitfalls:

  • Dated by the project's M1 Approved milestone, as QuickSight filters it, so it covers only rejections on projects that were later approved in the range.
  • "First submission only" keeps a project only when its project-level M1 Submitted milestone equals its earliest block submission. A project whose milestone doesn't match drops out entirely (3 of the 246 projects whose M1 was approved in October 2026).

Work Started to IV: Average Days over M1 Blocks

Executive Dashboard Funding: Work Started - IV tile · target none

Also called: Work Started - IV; work_started_to_iv; em1.workStartedToIv

Definition: Average calendar days from work started to install verified, for projects verified in the range that have an M1 block.

SQL
select avg(p.osc_671::date - p.osc_669::date) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_671::date between :start_date and :end_date  -- Installation Verified (OSC 671)

Pitfalls:

  • Built on the M1 dataset: projects with no M1 block yet are left out, and a project counts once per M1 block. Not the Installs sheet's Work Started to IV: Average Days by IV Date, which counts each project once.
  • Keeps moving after month-end as M1 blocks open for the month's installs.

Work Started to M1 Submitted: Median Days

Executive Dashboard Funding: Work Started - M1 Submitted tile · target none

Also called: Work Started - M1 Submitted; work_started_to_m1_submitted; em1.workStartedToSubmitted

Definition: Median calendar days from work started to the project's M1 Submitted milestone.

SQL
select percentile_cont(0.5) within group (order by p.osc_681::date - p.osc_669::date) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_681::date between :start_date and :end_date  -- project M1 Submitted (OSC 681)

Pitfalls:

  • A median, not an average.
  • One value per M1 block of each project, so resubmitted projects weigh more.

M1 Approvals and Rejections by Week

Executive Dashboard Funding: M1 Approval Rate by Date combo · target none

Also called: M1 Approval Rate by Date; m1_approved_count; m1_rejections; dynamic_m1_date

Definition: Each week's M1 approvals and rejections, with the week's approval rate.

SQL
select (coalesce(n.osc_1468, n.osc_1161))::date - extract(dow from (coalesce(n.osc_1468, n.osc_1161))::date)::int as week,  -- the Sunday starting the week
  count(*) filter (where n.osc_1161::date between :start_date and :end_date) as approved,
  count(*) filter (where n.osc_1468::date between :start_date and :end_date) as rejected,
  count(*) filter (where n.osc_1161::date between :start_date and :end_date)::numeric / nullif(count(*) filter (where n.osc_1161::date between :start_date and :end_date)
    + count(*) filter (where n.osc_1468::date between :start_date and :end_date), 0) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1468, n.osc_1161)::date between :start_date and :end_date  -- M1 Date: the rejected date, else the approved date
group by 1
order by 1

Pitfalls:

  • Each block sits in the week of its M1 Date (the rejected date, else the approved date). A block rejected and approved in the range counts both, in the week it was rejected.
  • Lumen draws weeks from Sunday, QuickSight's default Week; QuickSight's Period switch (Day, Month, Quarter, Year) isn't built in Lumen.

M1 Submittals by IV Month

Executive Dashboard Funding: M1 Submittals by IV Month table · target none

Also called: M1 Submittals by IV Date; m1_submitted_count

Definition: M1 blocks submitted in the range, counted by the month their project was install verified.

SQL
select date_trunc('month', p.osc_671::date)::date as iv_month, count(*) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1160::date between :start_date and :end_date
group by 1
order by 1 desc nulls last

Pitfalls:

  • Counts blocks, so a resubmission counts again.
  • Blocks on projects with no Installation Verified date show as a blank month.

M1 Approvals by IV Month

Executive Dashboard Funding: M1 Approvals by IV Month table · target none

Also called: M1 Approvals by IV Date; m1_approved_count

Definition: M1 blocks approved in the range, counted by the month their project was install verified.

SQL
select date_trunc('month', p.osc_671::date)::date as iv_month, count(*) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_682::date between :start_date and :end_date  -- project M1 Approved (OSC 682)
  and n.osc_1161::date between :start_date and :end_date  -- and the block approved in the range
group by 1
order by 1 desc nulls last

Pitfalls:

  • Needs both the project's M1 Approved milestone and the block's approved date in the range, as QuickSight filters it.

M1 Rejections by Reason (Executive)

Executive Dashboard Funding: M1 Rejection Reason Breakdown pie · target none
Install Crew Leaderboard Total Performance: M1 Rejection Reasons bars · target none

Also called: M1 Rejection Reason Breakdown; m1_funding_rejection_reason

Definition: M1 blocks rejected in the range, by rejection reason.

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
join phoenix.list_value lv
  on ',' || coalesce(array_to_string(n.osc_1248, ','), '') || ',' like '%,' || cast(lv.id as varchar) || ',%'
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1468::date between :start_date and :end_date
group by lv.list_value
order by value desc

Pitfalls:

  • Dated by the rejected date, funding team and financier rejections alike.
  • A rejection with two values counts once for each.
  • QuickSight's pie counts each combination of reasons as its own slice; Lumen splits them into single reasons.

M1 Rejections by Attributable Team (Executive)

Executive Dashboard Funding: M1 Attributable Breakdown pie · target none

Also called: M1 Attributable Breakdown; M1 Rejections by Attributable Team; m1_funding_rejection_attributable

Definition: M1 blocks rejected in the range, by the team the rejection is attributed to.

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
join phoenix.list_value lv
  on ',' || coalesce(array_to_string(n.osc_1469, ','), '') || ',' like '%,' || cast(lv.id as varchar) || ',%'
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1468::date between :start_date and :end_date
  and lv.list_value in ('Engineering', 'Field Audit', 'Funding Agent', 'Install Crew', 'Proposal Tool')  -- the pie's teams
group by lv.list_value
order by value desc

Pitfalls:

  • Only five teams count: Engineering, Field Audit, Funding Agent, Install Crew and Proposal Tool. QuickSight lists seven combinations of them; Lumen splits those into single teams.
  • A rejection with two values counts once for each.

M2 Submitted (Executive)

Executive Dashboard Funding: M2 Submitted tile · target none

Also called: M2 Submitted; em2.submitted

Definition: Projects with an M2 package submitted to the financier in the range.

SQL
select count(distinct m.project_id) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and m.osc_1256::date between :start_date and :end_date

Pitfalls:

  • Counts distinct projects, not blocks.
  • Dated by the block's M2 Submitted (PB 27, OSC 1256).
  • QuickSight's State filter excludes blanks, so it drops blocks on archived projects (they have no state in its projects dataset); Lumen and this SQL keep them, so Lumen can run higher.

M2 Approved (Executive)

Executive Dashboard Funding: M2 Approved tile · target none

Also called: M2 Approved; em2.approved

Definition: Projects with an M2 package approved in the range.

SQL
select count(distinct m.project_id) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and m.osc_1257::date between :start_date and :end_date

Pitfalls:

  • Counts distinct projects, not blocks.
  • Dated by the block's M2 Approved (OSC 1257). The project sheets' M2 Approved (All Types) uses the project milestone (OSC 685).
  • QuickSight's State filter excludes blanks, so it drops blocks on archived projects (they have no state in its projects dataset); Lumen and this SQL keep them, so Lumen can run higher.

M2 Funds Received (Executive)

Executive Dashboard Funding: M2 Funds Received tile · target none

Also called: M2 Funds Received; M2 Paid; em2.fundsReceived

Definition: Projects whose M2 funds were received in the range.

SQL
select count(distinct m.project_id) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_686::date between :start_date and :end_date

Pitfalls:

  • Dated by the project's M2 Funds Received milestone (OSC 686), not the block's (OSC 1258).
  • Only projects with at least one M2 block count.
  • QuickSight's State filter excludes blanks, so it drops blocks on archived projects (they have no state in its projects dataset); Lumen and this SQL keep them, so Lumen can run higher.

Sale to M2 Approved: Average Days (Executive Funding)

Executive Dashboard Funding: Sale - M2 Approved tile · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Sale - M2 Approved; sale_to_m2_approved; em2.saleToApproved

Definition: Average calendar days from sale to the block's M2 approval, over blocks approved in the range.

SQL
select avg(m.osc_1257::date - (case p.osc_660::date when date '0001-01-01' then date '1937-01-01'
    when date '0024-06-29' then date '2024-06-29' when date '0024-08-08' then date '2024-08-08'
    when date '0024-08-16' then date '2024-08-16' when date '0024-08-19' then date '2024-08-19'
    else p.osc_660::date end)) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and m.osc_1257::date between :start_date and :end_date

Pitfalls:

  • Dated by the block's approval.

PTO to M2 Approved: Average Days

Executive Dashboard Funding: PTO to M2 Approved tile (Lumen only) · target none

Also called: PTO to M2 Approved; em2.ptoToApproved

Definition: Average calendar days from PTO approved to the project's M2 approval.

SQL
select avg(p.osc_685::date - (case when p.osc_676::date = date '0223-02-01' then date '2023-02-01' else p.osc_676::date end)) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_685::date between :start_date and :end_date  -- project M2 Approved (OSC 685)
  and p.osc_684::date = (select min(e.osc_1256::date)  -- first submission only
    from data_map_1.dm_pb_27_data e where e.project_id = m.project_id)

Pitfalls:

  • Lumen's own: QuickSight has no such tile.
  • "First submission only" keeps a project only when its project-level M2 Submitted milestone equals its earliest block submission. A project whose milestone doesn't match drops out entirely (3 of the 246 projects whose M1 was approved in October 2026).
  • Averages over M2 blocks, not projects: the value is project-level, so a project with several M2 blocks counts once per block.

Sale to M2 Submitted: Average Days

Executive Dashboard Funding: Sale - M2 Submitted tile (Lumen only) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Sale - M2 Submitted; em2.saleToSubmitted

Definition: Average calendar days from sale to each M2 block's submission, for projects whose M2 Submitted milestone falls in the range.

SQL
select avg(m.osc_1256::date - (case p.osc_660::date when date '0001-01-01' then date '1937-01-01'
    when date '0024-06-29' then date '2024-06-29' when date '0024-08-08' then date '2024-08-08'
    when date '0024-08-16' then date '2024-08-16' when date '0024-08-19' then date '2024-08-19'
    else p.osc_660::date end)) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_684::date between :start_date and :end_date  -- project M2 Submitted (OSC 684)

Pitfalls:

  • Lumen's own: QuickSight has no such tile.
  • Rows are picked by the project's milestone but measured to each block's own submitted date.

PTO to M2 Submitted: Average Working Days

Executive Dashboard Funding: PTO to M2 Submitted tile · target none

Also called: PTO to M2 Submitted; pto_to_m2_submitted; em2.ptoToSubmitted

Definition: Average working days from PTO approved to the project's first M2 submission.

SQL
select avg(w.days) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
cross join lateral (select (case when p.osc_676::date = date '0223-02-01' then date '2023-02-01' else p.osc_676::date end) as pto,  -- PTO Approved (OSC 676)
    (select min(e.osc_1256::date) from data_map_1.dm_pb_27_data e where e.project_id = m.project_id) as first) f  -- first M2 submission
cross join lateral (select case when f.pto is null or f.first is null then null
    else (case when f.first < f.pto then -1 else 1 end) * count(*) end as days  -- working days, both ends counted
  from generate_series(least(f.pto, f.first), greatest(f.pto, f.first), interval '1 day') g(d)
  where extract(isodow from g.d) < 6) w
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_684::date between :start_date and :end_date  -- project M2 Submitted (OSC 684)

Pitfalls:

  • Working days, Monday to Friday with both ends counted; negative when M2 went in before PTO.
  • No first-submission filter, unlike the M1 timings: every M2 block of the project counts, each with the same figure, so resubmitted projects weigh more.

M2 Submitted to M2 Approved: Average Days

Executive Dashboard Funding: M2 Submitted to M2 Approved tile · target none

Also called: M2 Submitted to M2 Approved; m2_submitted_to_m2_approved; em2.submittedToApproved

Definition: Average calendar days from the project's M2 Submitted milestone to its M2 Approved milestone.

SQL
select avg(p.osc_685::date - p.osc_684::date) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_684::date between :start_date and :end_date  -- project M2 Submitted (OSC 684)

Pitfalls:

  • Uses the project's milestones (OSC 684, OSC 685), dated by M2 Submitted, unlike M1 Submitted to M1 Approved, which uses block dates and is dated by approval.
  • Averages over M2 blocks, not projects: the value is project-level, so a project with several M2 blocks counts once per block.

Fundable PTO (Executive)

Executive Dashboard Funding: Fundable PTO tile · target none

Also called: Fundable PTO; fundable_pto; em2.fundablePto

Definition: M2 blocks approved in the range 7 or more working days after the project's PTO.

SQL
select count(*) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and m.osc_1257::date between :start_date and :end_date
  and m.osc_1257::date >= (case when p.osc_676::date = date '0223-02-01' then date '2023-02-01' else p.osc_676::date end)
  and (select count(*) from generate_series((case when p.osc_676::date = date '0223-02-01' then date '2023-02-01' else p.osc_676::date end), m.osc_1257::date, interval '1 day') g(d)
      where extract(isodow from g.d) < 6) >= 7  -- working days, both ends counted

Pitfalls:

  • Counts blocks.
  • "Fundable" here means 7 or more working days after PTO, both days counted. An M2 approved sooner is not fundable.

Fundable PTO %

Executive Dashboard Funding: % Fundable PTO tile · target none

Also called: % Fundable PTO; %_fundable_pto; em2.fundablePtoPct

Definition: Of the M2 blocks approved in the range whose project has a PTO date, the share approved 7 or more working days after PTO.

SQL
select count(*) filter (where m.osc_1257::date >= (case when p.osc_676::date = date '0223-02-01' then date '2023-02-01' else p.osc_676::date end) and (select count(*) from generate_series((case when p.osc_676::date = date '0223-02-01' then date '2023-02-01' else p.osc_676::date end), m.osc_1257::date, interval '1 day') g(d)
      where extract(isodow from g.d) < 6) >= 7)::numeric / nullif(count(p.osc_676), 0) as value,
  count(*) filter (where m.osc_1257::date >= (case when p.osc_676::date = date '0223-02-01' then date '2023-02-01' else p.osc_676::date end) and (select count(*) from generate_series((case when p.osc_676::date = date '0223-02-01' then date '2023-02-01' else p.osc_676::date end), m.osc_1257::date, interval '1 day') g(d)
      where extract(isodow from g.d) < 6) >= 7) as num,
  count(p.osc_676) as den
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and m.osc_1257::date between :start_date and :end_date

Pitfalls:

  • Blocks with no PTO date are left off the bottom.

M2 Approval Rate (Executive)

Executive Dashboard Funding: M2 Approval Rate tile · target none

Also called: M2 Approval Rate; m2_approval_rate; em2.approvalRate

Definition: Of the M2 blocks on projects whose M2 Approved milestone falls in the range, approvals in the range over approvals plus rejections in the range.

SQL
select count(*) filter (where m.osc_1257::date between :start_date and :end_date)::numeric / nullif(count(*) filter (where m.osc_1257::date between :start_date and :end_date) + count(*) filter (where m.osc_1533::date between :start_date and :end_date), 0) as value,
  count(*) filter (where m.osc_1257::date between :start_date and :end_date) as num, count(*) filter (where m.osc_1257::date between :start_date and :end_date) + count(*) filter (where m.osc_1533::date between :start_date and :end_date) as den
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_685::date between :start_date and :end_date  -- project M2 Approved (OSC 685)

Pitfalls:

  • Rows are picked by the project's M2 Approved milestone, so rejections on projects not yet approved are left out and the rate runs high: 95.7% in October 2026, against 68.2% for M2 Approval Rate by M2 Date. The combo's M2 Approval Rate by M2 Date picks by the block's own dates.
  • Counts every rejection, the funding team's included.

M2 Approval Rate by M2 Date

Executive Dashboard Funding: M2 Approval Rate by Date combo (the line) · target none

Also called: m2_approval_rate (on the combo); em2.approvalRateByDate

Definition: Of the M2 blocks decided in the range, the share approved.

SQL
select count(*) filter (where m.osc_1257::date between :start_date and :end_date)::numeric / nullif(count(*) filter (where m.osc_1257::date between :start_date and :end_date) + count(*) filter (where m.osc_1533::date between :start_date and :end_date), 0) as value,
  count(*) filter (where m.osc_1257::date between :start_date and :end_date) as num, count(*) filter (where m.osc_1257::date between :start_date and :end_date) + count(*) filter (where m.osc_1533::date between :start_date and :end_date) as den
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(nullif(m.osc_1257, date '0001-01-01'), m.osc_1533)::date between :start_date and :end_date  -- M2 Date: the approved date, else the rejected date

Pitfalls:

  • M2 Date takes the approved date first, the reverse of M1 Date.
  • An approval or rejection counts only when its own date falls in the range.

M2 First Time Approval Rate (Executive)

Executive Dashboard Funding: 1st Time M2 Approval Rate tile (Lumen only) · target none

Also called: 1st Time M2 Approval Rate; em2.firstTimeApprovalRate

Definition: M2 Approval Rate by M2 Date over each project's first M2 block only.

SQL
select count(*) filter (where m.osc_1257::date between :start_date and :end_date)::numeric / nullif(count(*) filter (where m.osc_1257::date between :start_date and :end_date) + count(*) filter (where m.osc_1533::date between :start_date and :end_date), 0) as value,
  count(*) filter (where m.osc_1257::date between :start_date and :end_date) as num, count(*) filter (where m.osc_1257::date between :start_date and :end_date) + count(*) filter (where m.osc_1533::date between :start_date and :end_date) as den
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(nullif(m.osc_1257, date '0001-01-01'), m.osc_1533)::date between :start_date and :end_date  -- M2 Date
  and not exists (select 1 from data_map_1.dm_pb_27_data e  -- the project's first M2 block
    where e.project_id = m.project_id and e.date_created < m.date_created)

Pitfalls:

  • Lumen's own: QuickSight has no such tile.
  • "First" is the project's first M2 block by creation date.

M2 Financier Approval Rate (Executive)

Executive Dashboard Funding: Financier M2 Approval Rate tile (Lumen only) · target none

Also called: Financier M2 Approval Rate; em2.financierApprovalRate

Definition: Of the M2 blocks decided in the range, approved ones over approved plus those the financier rejected.

SQL
select count(nullif(m.osc_1257, date '0001-01-01'))::numeric / nullif(count(nullif(m.osc_1257, date '0001-01-01')) + count(*) filter (where rb.list_value = 'Financier'), 0) as value,
  count(nullif(m.osc_1257, date '0001-01-01')) as num, count(nullif(m.osc_1257, date '0001-01-01')) + count(*) filter (where rb.list_value = 'Financier') as den
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(nullif(m.osc_1257, date '0001-01-01'), m.osc_1533)::date between :start_date and :end_date  -- M2 Date: the approved date, else the rejected date

Pitfalls:

  • Lumen's own: QuickSight has no such tile.
  • Rows are picked by M2 Date; the top counts any approved date.

M2 Internal Approval Rate (Executive)

Executive Dashboard Funding: Internal M2 Approval Rate tile (Lumen only) · target none

Also called: Internal M2 Approval Rate; em2.internalApprovalRate

Definition: Of the M2 packages through the funding team's internal check, the share sent on to the financier.

SQL
select count(m.osc_1256)::numeric / nullif(count(m.osc_1256) + count(*) filter (where (m.osc_1533 is not null and rb.list_value = 'Funding Team')), 0) as value,
  count(m.osc_1256) as num, count(m.osc_1256) + count(*) filter (where (m.osc_1533 is not null and rb.list_value = 'Funding Team')) as den
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.list_value rb on rb.id = m.osc_1763  -- Funding Rejected By
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(case when rb.list_value = 'Funding Team' then m.osc_1533 end, m.osc_1256)::date
    between :start_date and :end_date  -- Internal M2 Date

Pitfalls:

  • Lumen's own: QuickSight has no such tile.
  • Dated by Internal M2 Date: the funding team's rejection date, else the submitted date. A block both submitted and rejected by the funding team counts twice on the bottom.

M2 Approvals and Rejections by Week

Executive Dashboard Funding: M2 Approval Rate by Date combo · target none

Also called: M2 Approval Rate by Date; m2_approved_count; m2_rejected; dynamic_m2_date

Definition: Each week's M2 approvals and rejections, with the week's approval rate (M2 Approval Rate by M2 Date).

SQL
select (coalesce(nullif(m.osc_1257, date '0001-01-01'), m.osc_1533))::date - extract(dow from (coalesce(nullif(m.osc_1257, date '0001-01-01'), m.osc_1533))::date)::int as week,  -- the Sunday starting the week
  count(*) filter (where m.osc_1257::date between :start_date and :end_date) as approved,
  count(*) filter (where m.osc_1533::date between :start_date and :end_date) as rejected,
  count(*) filter (where m.osc_1257::date between :start_date and :end_date)::numeric / nullif(count(*) filter (where m.osc_1257::date between :start_date and :end_date)
    + count(*) filter (where m.osc_1533::date between :start_date and :end_date), 0) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(nullif(m.osc_1257, date '0001-01-01'), m.osc_1533)::date between :start_date and :end_date  -- M2 Date: the approved date, else the rejected date
group by 1
order by 1

Pitfalls:

  • Each block sits in the week of its M2 Date (the approved date, else the rejected date).
  • Lumen draws weeks from Sunday, QuickSight's default Week; QuickSight's Period switch (Day, Month, Quarter, Year) isn't built in Lumen.

M2 Approvals by PTO Month

Executive Dashboard Funding: M2 Approvals by PTO Month table · target none

Also called: M2 Approvals by PTO Date; m2_approved_count

Definition: M2 blocks approved in the range, counted by the month their project's PTO was approved.

SQL
select date_trunc('month', (case when p.osc_676::date = date '0223-02-01' then date '2023-02-01' else p.osc_676::date end))::date as pto_month, count(*) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_685::date between :start_date and :end_date  -- project M2 Approved (OSC 685)
  and m.osc_1257::date between :start_date and :end_date  -- and the block approved in the range
group by 1
order by 1 desc nulls last

Pitfalls:

  • Needs both the project's M2 Approved milestone and the block's approved date in the range.

M2 Rejections by Reason (Executive)

Executive Dashboard Funding: M2 Rejection Reason Breakdown pie · target none

Also called: M2 Rejection Reason Breakdown

Definition: M2 blocks rejected in the range, by rejection reason.

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
join phoenix.list_value lv
  on ',' || coalesce(array_to_string(m.osc_1259, ','), '') || ',' like '%,' || cast(lv.id as varchar) || ',%'
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and m.osc_1533::date between :start_date and :end_date
group by lv.list_value
order by value desc

Pitfalls:

  • A rejection with two values counts once for each.

M2 Rejections by Attributable Team (Executive)

Executive Dashboard Funding: M2 Attributable Breakdown pie · target none

Also called: M2 Attributable Breakdown; M2 Rejections by Attributable Team

Definition: M2 blocks rejected in the range, by the team the rejection is attributed to.

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
join phoenix.list_value lv
  on ',' || coalesce(array_to_string(m.osc_1531, ','), '') || ',' like '%,' || cast(lv.id as varchar) || ',%'
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and m.osc_1533::date between :start_date and :end_date
group by lv.list_value
order by value desc

Pitfalls:

  • A rejection with two values counts once for each.
  • Unlike M1's, every team counts.

Pending M1 Approval: Projects

Executive Dashboard Funding Forecast: Pending M1 Approval board · target none

Also called: Pending M1 Approval (Projects); fm1.projects

Definition: Projects with M1 packages waiting on the financier's approval.

SQL
select count(distinct n.project_id) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status po on po.id = p.object_status_id
left join phoenix.base_status bs on bs.id = po.base_status_id
left join phoenix.object_status os on os.id = n.object_status_id  -- the block's status
left join data_map_1.dm_pb_3_data c on c.project_id = n.project_id and c.main = true  -- main contract
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and bs.base_status = 'ACTIVE'
  and os.object_status = 'Pending Approval'
  and n.osc_1160 is not null  -- submitted
  and n.osc_1161 is null  -- not approved

Pitfalls:

  • As of today: the page's dates don't apply.
  • Block status Pending Approval, submitted, not yet approved, on active projects only (On Hold and the rest left out).

Pending M1 Approval: M1 Amount

Executive Dashboard Funding Forecast: Pending M1 Approval board · target none

Also called: M1 Amount; m1_amount; fm1.amount

Definition: The estimated M1 money on M1 packages waiting on the financier's approval: four fifths of each project's total package price.

SQL
select sum(c.osc_28 * 0.8) as value  -- four fifths of Total Package Price
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status po on po.id = p.object_status_id
left join phoenix.base_status bs on bs.id = po.base_status_id
left join phoenix.object_status os on os.id = n.object_status_id  -- the block's status
left join data_map_1.dm_pb_3_data c on c.project_id = n.project_id and c.main = true  -- main contract
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and bs.base_status = 'ACTIVE'
  and os.object_status = 'Pending Approval'
  and n.osc_1160 is not null  -- submitted
  and n.osc_1161 is null  -- not approved

Pitfalls:

  • An estimate from the main contract's Total Package Price (OSC 28), not the financier's payment.
  • Summed per block: a project with two waiting blocks counts twice.
  • As of today: the page's dates don't apply.

Pending M1 Approval: Financed Amount Less Equipment

Executive Dashboard Funding Forecast: Pending M1 Approval board · target none

Also called: Financed Amount Less Equipment; financed_amount_less_equipment; fm1.financedLessEquipment

Definition: 70% of the M1 Amount on M1 packages waiting on the financier's approval.

SQL
select sum(c.osc_28 * 0.8 * 0.7) as value  -- 70% of the M1 Amount
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status po on po.id = p.object_status_id
left join phoenix.base_status bs on bs.id = po.base_status_id
left join phoenix.object_status os on os.id = n.object_status_id  -- the block's status
left join data_map_1.dm_pb_3_data c on c.project_id = n.project_id and c.main = true  -- main contract
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and bs.base_status = 'ACTIVE'
  and os.object_status = 'Pending Approval'
  and n.osc_1160 is not null  -- submitted
  and n.osc_1161 is null  -- not approved

Pitfalls:

  • A flat 70% of the M1 Amount (56% of the package price), not a real equipment figure.
  • As of today: the page's dates don't apply.

Pending M1 Approval: Oldest Days Since Submitted

Executive Dashboard Funding Forecast: Pending M1 Approval board · target none

Also called: Days Since Submitted; days_since_m1_submitted; fm1.daysSinceSubmitted

Definition: Calendar days since the oldest M1 packages waiting on the financier's approval was submitted. The board lists each date with its own count.

SQL
select max(current_date - n.osc_1160::date) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status po on po.id = p.object_status_id
left join phoenix.base_status bs on bs.id = po.base_status_id
left join phoenix.object_status os on os.id = n.object_status_id  -- the block's status
left join data_map_1.dm_pb_3_data c on c.project_id = n.project_id and c.main = true  -- main contract
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and bs.base_status = 'ACTIVE'
  and os.object_status = 'Pending Approval'
  and n.osc_1160 is not null  -- submitted
  and n.osc_1161 is null  -- not approved

Pitfalls:

  • Calendar days to today. Lumen counts to today's UTC date, so in the evening, Mountain time, it can read a day more than this SQL.
  • As of today: the page's dates don't apply.

Pending M1 Payment: Projects

Executive Dashboard Funding Forecast: Pending M1 Payment board · target none

Also called: Pending M1 Payment (Projects); fm1.projects

Definition: Projects with approved M1 packages waiting on payment.

SQL
select count(distinct n.project_id) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status po on po.id = p.object_status_id
left join phoenix.base_status bs on bs.id = po.base_status_id
left join phoenix.object_status os on os.id = n.object_status_id  -- the block's status
left join data_map_1.dm_pb_3_data c on c.project_id = n.project_id and c.main = true  -- main contract
left join phoenix.record fin on fin.id = c.osc_849  -- financier
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and bs.base_status = 'ACTIVE'
  and os.object_status in ('Funding Approved', 'Conditionally Approved')
  and n.osc_1161 is not null  -- approved
  and n.osc_1162 is null  -- block's funds not received
  and fin.record_name in ('Brightstar', 'Cash', 'Dividend', 'EnFin', 'Expired Financing', 'FLIC Financial', 'Goodleap', 'LightReach', 'Mosaic', 'Service', 'Service Finance', 'Solar Leasing 1', 'Solar Z', 'Sunergy Loan', 'Sunlight', 'Sunnova', 'Sunrun', 'Sun Solar Tranche')

Pitfalls:

  • As of today: the page's dates don't apply.
  • Block status Funding Approved or Conditionally Approved, approved, the block's funds received date blank, on active projects only.
  • Only the 18 financiers the sheet names count; a project with another or no financier is left out.

Pending M1 Payment: M1 Amount

Executive Dashboard Funding Forecast: Pending M1 Payment board · target none

Also called: M1 Amount; m1_amount; fm1.amount

Definition: The estimated M1 money on approved M1 packages waiting on payment: four fifths of each project's total package price.

SQL
select sum(c.osc_28 * 0.8) as value  -- four fifths of Total Package Price
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status po on po.id = p.object_status_id
left join phoenix.base_status bs on bs.id = po.base_status_id
left join phoenix.object_status os on os.id = n.object_status_id  -- the block's status
left join data_map_1.dm_pb_3_data c on c.project_id = n.project_id and c.main = true  -- main contract
left join phoenix.record fin on fin.id = c.osc_849  -- financier
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and bs.base_status = 'ACTIVE'
  and os.object_status in ('Funding Approved', 'Conditionally Approved')
  and n.osc_1161 is not null  -- approved
  and n.osc_1162 is null  -- block's funds not received
  and fin.record_name in ('Brightstar', 'Cash', 'Dividend', 'EnFin', 'Expired Financing', 'FLIC Financial', 'Goodleap', 'LightReach', 'Mosaic', 'Service', 'Service Finance', 'Solar Leasing 1', 'Solar Z', 'Sunergy Loan', 'Sunlight', 'Sunnova', 'Sunrun', 'Sun Solar Tranche')

Pitfalls:

  • An estimate from the main contract's Total Package Price (OSC 28), not the financier's payment.
  • Summed per block: a project with two waiting blocks counts twice.
  • As of today: the page's dates don't apply.

Pending M1 Payment: Financed Amount Less Equipment

Executive Dashboard Funding Forecast: Pending M1 Payment board · target none

Also called: Financed Amount Less Equipment; financed_amount_less_equipment; fm1.financedLessEquipment

Definition: 70% of the M1 Amount on approved M1 packages waiting on payment.

SQL
select sum(c.osc_28 * 0.8 * 0.7) as value  -- 70% of the M1 Amount
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status po on po.id = p.object_status_id
left join phoenix.base_status bs on bs.id = po.base_status_id
left join phoenix.object_status os on os.id = n.object_status_id  -- the block's status
left join data_map_1.dm_pb_3_data c on c.project_id = n.project_id and c.main = true  -- main contract
left join phoenix.record fin on fin.id = c.osc_849  -- financier
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and bs.base_status = 'ACTIVE'
  and os.object_status in ('Funding Approved', 'Conditionally Approved')
  and n.osc_1161 is not null  -- approved
  and n.osc_1162 is null  -- block's funds not received
  and fin.record_name in ('Brightstar', 'Cash', 'Dividend', 'EnFin', 'Expired Financing', 'FLIC Financial', 'Goodleap', 'LightReach', 'Mosaic', 'Service', 'Service Finance', 'Solar Leasing 1', 'Solar Z', 'Sunergy Loan', 'Sunlight', 'Sunnova', 'Sunrun', 'Sun Solar Tranche')

Pitfalls:

  • A flat 70% of the M1 Amount (56% of the package price), not a real equipment figure.
  • As of today: the page's dates don't apply.

Pending M1 Payment: Oldest Days Since Approval

Executive Dashboard Funding Forecast: Pending M1 Payment board · target none

Also called: Days Since Approval; days_since_m1_approval; fm1.daysSinceApproval

Definition: Calendar days since the oldest approved M1 packages waiting on payment was approved. The board lists each date with its own count.

SQL
select max(current_date - n.osc_1161::date) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status po on po.id = p.object_status_id
left join phoenix.base_status bs on bs.id = po.base_status_id
left join phoenix.object_status os on os.id = n.object_status_id  -- the block's status
left join data_map_1.dm_pb_3_data c on c.project_id = n.project_id and c.main = true  -- main contract
left join phoenix.record fin on fin.id = c.osc_849  -- financier
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and bs.base_status = 'ACTIVE'
  and os.object_status in ('Funding Approved', 'Conditionally Approved')
  and n.osc_1161 is not null  -- approved
  and n.osc_1162 is null  -- block's funds not received
  and fin.record_name in ('Brightstar', 'Cash', 'Dividend', 'EnFin', 'Expired Financing', 'FLIC Financial', 'Goodleap', 'LightReach', 'Mosaic', 'Service', 'Service Finance', 'Solar Leasing 1', 'Solar Z', 'Sunergy Loan', 'Sunlight', 'Sunnova', 'Sunrun', 'Sun Solar Tranche')

Pitfalls:

  • Calendar days to today. Lumen counts to today's UTC date, so in the evening, Mountain time, it can read a day more than this SQL.
  • The oldest row is often a stale block nobody closed: on 2026-12-02 the oldest was approved 1,720 days earlier.
  • As of today: the page's dates don't apply.

Pending M2 Approval: Projects

Executive Dashboard Funding Forecast: Pending M2 Approval board · target none

Also called: Pending M2 Approval (Projects); fm2.projects

Definition: Projects with M2 packages waiting on the financier's approval.

SQL
select count(distinct m.project_id) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.object_status po on po.id = p.object_status_id
left join phoenix.base_status bs on bs.id = po.base_status_id
left join phoenix.object_status os on os.id = m.object_status_id  -- the block's status
left join data_map_1.dm_pb_3_data c on c.project_id = m.project_id and c.main = true  -- main contract
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and bs.base_status = 'ACTIVE'
  and os.object_status = 'Pending Approval'
  and m.osc_1256 is not null  -- submitted
  and nullif(m.osc_1257, date '0001-01-01') is null  -- not approved

Pitfalls:

  • As of today: the page's dates don't apply.
  • Block status Pending Approval, submitted, not yet approved, on active projects only (On Hold and the rest left out).

Pending M2 Approval: M2 Amount

Executive Dashboard Funding Forecast: Pending M2 Approval board · target none

Also called: M2 Amount; m2_amount; fm2.amount

Definition: The estimated M2 money on M2 packages waiting on the financier's approval: a fifth of each project's total package price.

SQL
select sum(c.osc_28 * 0.2) as value  -- a fifth of Total Package Price
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.object_status po on po.id = p.object_status_id
left join phoenix.base_status bs on bs.id = po.base_status_id
left join phoenix.object_status os on os.id = m.object_status_id  -- the block's status
left join data_map_1.dm_pb_3_data c on c.project_id = m.project_id and c.main = true  -- main contract
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and bs.base_status = 'ACTIVE'
  and os.object_status = 'Pending Approval'
  and m.osc_1256 is not null  -- submitted
  and nullif(m.osc_1257, date '0001-01-01') is null  -- not approved

Pitfalls:

  • An estimate from the main contract's Total Package Price (OSC 28), not the financier's payment.
  • Summed per block: a project with two waiting blocks counts twice.
  • As of today: the page's dates don't apply.

Pending M2 Approval: Oldest Days Since Submitted

Executive Dashboard Funding Forecast: Pending M2 Approval board · target none

Also called: Days Since Submitted; days_since_m2_submitted; fm2.daysSinceSubmitted

Definition: Calendar days since the oldest M2 packages waiting on the financier's approval was submitted. The board lists each date with its own count.

SQL
select max(current_date - m.osc_1256::date) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.object_status po on po.id = p.object_status_id
left join phoenix.base_status bs on bs.id = po.base_status_id
left join phoenix.object_status os on os.id = m.object_status_id  -- the block's status
left join data_map_1.dm_pb_3_data c on c.project_id = m.project_id and c.main = true  -- main contract
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and bs.base_status = 'ACTIVE'
  and os.object_status = 'Pending Approval'
  and m.osc_1256 is not null  -- submitted
  and nullif(m.osc_1257, date '0001-01-01') is null  -- not approved

Pitfalls:

  • Calendar days to today. Lumen counts to today's UTC date, so in the evening, Mountain time, it can read a day more than this SQL.
  • As of today: the page's dates don't apply.

Pending M2 Payment: Projects

Executive Dashboard Funding Forecast: Pending M2 Payment board · target none

Also called: Pending M2 Payment (Projects); fm2.projects

Definition: Projects with approved M2 packages waiting on payment.

SQL
select count(distinct m.project_id) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.object_status po on po.id = p.object_status_id
left join phoenix.base_status bs on bs.id = po.base_status_id
left join phoenix.object_status os on os.id = m.object_status_id  -- the block's status
left join data_map_1.dm_pb_3_data c on c.project_id = m.project_id and c.main = true  -- main contract
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and bs.base_status = 'ACTIVE'
  and os.object_status = 'Funding Approved'
  and nullif(m.osc_1257, date '0001-01-01') is not null  -- approved
  and m.osc_1258 is null  -- block's funds not received

Pitfalls:

  • As of today: the page's dates don't apply.
  • Block status Funding Approved, approved, the block's funds received date blank, on active projects only.

Pending M2 Payment: M2 Amount

Executive Dashboard Funding Forecast: Pending M2 Payment board · target none

Also called: M2 Amount; m2_amount; fm2.amount

Definition: The estimated M2 money on approved M2 packages waiting on payment: a fifth of each project's total package price.

SQL
select sum(c.osc_28 * 0.2) as value  -- a fifth of Total Package Price
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.object_status po on po.id = p.object_status_id
left join phoenix.base_status bs on bs.id = po.base_status_id
left join phoenix.object_status os on os.id = m.object_status_id  -- the block's status
left join data_map_1.dm_pb_3_data c on c.project_id = m.project_id and c.main = true  -- main contract
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and bs.base_status = 'ACTIVE'
  and os.object_status = 'Funding Approved'
  and nullif(m.osc_1257, date '0001-01-01') is not null  -- approved
  and m.osc_1258 is null  -- block's funds not received

Pitfalls:

  • An estimate from the main contract's Total Package Price (OSC 28), not the financier's payment.
  • Summed per block: a project with two waiting blocks counts twice.
  • As of today: the page's dates don't apply.

Pending M2 Payment: Oldest Days Since Approval

Executive Dashboard Funding Forecast: Pending M2 Payment board · target none

Also called: Days Since Approval; days_since_m2_approval; fm2.daysSinceApproval

Definition: Calendar days since the oldest approved M2 packages waiting on payment was approved. The board lists each date with its own count.

SQL
select max(current_date - m.osc_1257::date) as value
from data_map_1.dm_pb_27_data m  -- M2 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = m.project_id
left join phoenix.object_status po on po.id = p.object_status_id
left join phoenix.base_status bs on bs.id = po.base_status_id
left join phoenix.object_status os on os.id = m.object_status_id  -- the block's status
left join data_map_1.dm_pb_3_data c on c.project_id = m.project_id and c.main = true  -- main contract
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and bs.base_status = 'ACTIVE'
  and os.object_status = 'Funding Approved'
  and nullif(m.osc_1257, date '0001-01-01') is not null  -- approved
  and m.osc_1258 is null  -- block's funds not received

Pitfalls:

  • Calendar days to today. Lumen counts to today's UTC date, so in the evening, Mountain time, it can read a day more than this SQL.
  • The oldest row is often a stale block nobody closed: on 2026-12-02 the oldest was approved 1,300 days earlier.
  • As of today: the page's dates don't apply.

Gross Sales (Sr Staff)

Sr Staff Sr Staff Meeting Report: Key Metrics (Net Sales tile, "of N sold"); Gross Sales (#) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Gross Sales (#); jobs sold

Definition: Projects of every type submitted in the range, canceled ones included.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")

Pitfalls:

  • Dated by Project Submitted (OSC 660), which the report calls "Project Sold" and "Sale": it counts submissions, not sales closed at Deal Review (Project Closed, OSC 687). Of the 123 projects submitted in October 2026 (test accounts included), 84 had closed by 2026-12-02.
  • Every project type (Residential, Battery Only, Roof and R&R), unlike the Executive Dashboard's Sales tiles, which count Residential only.
  • QuickSight's dataset keeps test accounts; Lumen and this SQL leave them out. October 2026 had 4 test accounts submitted, so QuickSight's 123 is Lumen's 119.

Net Sales (Sr Staff)

Sr Staff Sr Staff Meeting Report: Key Metrics: Net Sales; Net Sales (#) · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Net Sales (#)

Definition: Projects of every type submitted in the range that aren't canceled today.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled

Pitfalls:

  • Uses each project's status today, so a past range's net sales shrink as projects cancel.
  • On Hold counts as a net sale; only Canceled and Cancellation in Progress (statuses 58, 59) drop out.
  • Every project type (Residential, Battery Only, Roof and R&R), unlike the Executive Dashboard's Sales tiles, which count Residential only.

Cancellation Rate (Sr Staff)

Sr Staff Sr Staff Meeting Report: Key Metrics (Net Sales tile, "canceled"); Cancellation Rate · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Cancel rate

Definition: Of the projects submitted in the range, the share now Canceled or Cancellation in Progress.

SQL
select count(*) filter (where p.object_status_id in (58, 59))::numeric / nullif(count(*), 0) as value,
  count(*) filter (where p.object_status_id in (58, 59)) as num, count(*) as den
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")

Pitfalls:

  • Every type, so not the Executive Dashboard's Cancellation Rate (Residential only).
  • Status today, so a recent range looks better than it will.

Avg Days Sale to Install Verified

Sr Staff Sr Staff Meeting Report: Avg Days per Stage · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Sale to IV; Avg Days Sale to Install Verified

Definition: Average days from submission to install verified, for projects submitted in the range whose PTO was approved this calendar year.

SQL
select avg((p.osc_671)::date - (p.osc_660)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.osc_676::date between date_trunc('year', current_date)::date and current_date  -- PTO approved this year

Pitfalls:

  • Only projects with PTO approved this calendar year (to today) count, whatever the range: a range in an earlier year returns nothing.
  • "Sale" here is Project Submitted (OSC 660), not Deal Review.
  • A cohort by submitted date, so a recent range holds only the jobs that already reached the end milestone and looks faster than it will.

Avg Days Perfect Packet to Install Verified

Sr Staff Sr Staff Meeting Report: Avg Days per Stage · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Deal Review to IV

Definition: Average days from Deal Review complete to install verified, for projects submitted in the range whose PTO was approved this calendar year.

SQL
select avg((p.osc_671)::date - (p.osc_687)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.osc_676::date between date_trunc('year', current_date)::date and current_date  -- PTO approved this year

Pitfalls:

  • "Perfect Packet" is Deal Review complete (Project Closed, OSC 687); the range is still by submitted date.
  • Only projects with PTO approved this calendar year count, as above.

Avg Days Install to Ready for PTO

Sr Staff Sr Staff Meeting Report: Avg Days per Stage · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Install to inspections passed

Definition: Average days from install verified to all inspections passed, for projects submitted in the range.

SQL
select avg((p.osc_674)::date - (p.osc_671)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")

Pitfalls:

  • "Ready for PTO" is All Inspections Passed (OSC 674).
  • A cohort by submitted date, so a recent range holds only the jobs that already reached the end milestone and looks faster than it will.

Avg Days M1 Approved to M2 Approved

Sr Staff Sr Staff Meeting Report: Avg Days per Stage · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Avg Days Install to PTO Approved (QuickSight's title)

Definition: Average days from M1 approved to M2 approved, for projects submitted in the range.

SQL
select avg((p.osc_685)::date - (p.osc_682)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")

Pitfalls:

  • QuickSight titles this tile Avg Days Install to PTO Approved, but it averages M1 approved (OSC 682) to M2 approved (OSC 685). Lumen retitles it.
  • A cohort by submitted date, so a recent range holds only the jobs that already reached the end milestone and looks faster than it will.

Avg Days Sale to PTO

Sr Staff Sr Staff Meeting Report: Avg Days per Stage · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Sale to PTO

Definition: Average days from submission to PTO approved, for projects submitted in the range.

SQL
select avg((p.osc_676)::date - (p.osc_660)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")

Pitfalls:

  • Not the Executive Dashboard's Sale to PTO, which is Residential only.
  • A cohort by submitted date, so a recent range holds only the jobs that already reached the end milestone and looks faster than it will.

Avg Days DR to PTO

Sr Staff Sr Staff Meeting Report: Avg Days per Stage · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Deal Review to PTO

Definition: Average days from Deal Review complete to PTO approved, for projects submitted in the range.

SQL
select avg((p.osc_676)::date - (p.osc_687)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")

Pitfalls:

  • Dated by submission, not by Deal Review or PTO, so not the Executive PTO sheet's Deal Review to PTO figures.
  • A PTO before the Deal Review counts as negative days here, not 0.

Installed Within SLA

Sr Staff Sr Staff Meeting Report: Key Metrics (Installed Within 43 Days tile); Installed Jobs Breakdown · target 43 days from Deal Review

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Installed within 43 days

Definition: Projects submitted in the range that were installed within 43 days of Deal Review complete.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and (p.osc_671)::date - (p.osc_687)::date <= 43  -- installed within 43 days of Deal Review

Pitfalls:

  • Canceled and On Hold jobs count: no net-sale filter.
  • QuickSight's sale-date version sits in a disabled filter group; only the Deal Review leg applies.
  • Install before Deal Review counts as within.

Installed Outside SLA

Sr Staff Sr Staff Meeting Report: Key Metrics (Installed Within 43 Days tile); Installed Jobs Breakdown · target 0

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Installed late

Definition: Projects submitted in the range that were installed more than 43 days after Deal Review complete.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and (p.osc_671)::date - (p.osc_687)::date > 43  -- installed over 43 days after Deal Review

Pitfalls:

  • Canceled and On Hold jobs count.

Yet to Be Installed, Still Within SLA

Sr Staff Sr Staff Meeting Report: Key Metrics (waiting, still within); Installed Jobs Breakdown · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Waiting for install, within 43 days

Definition: Net sales submitted in the range, not installed, whose Deal Review completed at most 43 days ago.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is null and current_date - (p.osc_687)::date <= 43  -- not installed, Deal Review at most 43 days ago

Pitfalls:

  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.
  • Jobs not through Deal Review aren't counted at all: the clock starts at Deal Review.
  • QuickSight's Custom Date block counts from the sale; its This Year block, which Lumen keeps, counts from Deal Review.

Yet to Be Installed, Out of SLA

Sr Staff Sr Staff Meeting Report: Key Metrics (waiting past 43 days); Installed Jobs Breakdown · target 0
Sr Staff Sr Staff Drilldown: Total Accounts · target 0

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Total Accounts (Drilldown); waiting for install past 43 days

Definition: Net sales submitted in the range, not installed, whose Deal Review completed more than 43 days ago.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is null and current_date - (p.osc_687)::date > 43  -- not installed, Deal Review over 43 days ago

Pitfalls:

  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.
  • QuickSight's Drilldown table lists jobs submitted over 43 days ago; its tile and Lumen count from Deal Review.
  • On Hold counts as a net sale; only Canceled and Cancellation in Progress (statuses 58, 59) drop out.

Days Since Sale (Installed Within SLA)

Sr Staff Sr Staff Meeting Report: Avg Days, Install SLA, 43 Days · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Sale to install, installed within SLA

Definition: Average days from submission to install verified, for the jobs counted in Installed Within SLA.

SQL
select avg((p.osc_671)::date - (p.osc_660)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and (p.osc_671)::date - (p.osc_687)::date <= 43  -- installed within 43 days of Deal Review

Pitfalls:

  • Measured from submission while the SLA is measured from Deal Review, so it can exceed 43.

Days Since Sale (Installed Outside SLA)

Sr Staff Sr Staff Meeting Report: Avg Days, Install SLA, 43 Days · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Sale to install, installed late

Definition: Average days from submission to install verified, for the jobs counted in Installed Outside SLA.

SQL
select avg((p.osc_671)::date - (p.osc_660)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and (p.osc_671)::date - (p.osc_687)::date > 43  -- installed over 43 days after Deal Review

Pitfalls: None beyond the report's rules.

Days Since Sale (Still Within SLA)

Sr Staff Sr Staff Meeting Report: Avg Days, Install SLA, 43 Days · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Days waiting for install, within SLA

Definition: Average days from submission to today, for the jobs counted in Yet to Be Installed, Still Within SLA.

SQL
select avg(current_date - (p.osc_660)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is null and current_date - (p.osc_687)::date <= 43  -- not installed, Deal Review at most 43 days ago

Pitfalls:

  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.

Days Since Sale (Out of SLA)

Sr Staff Sr Staff Meeting Report: Avg Days, Install SLA, 43 Days · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Days waiting for install, past SLA

Definition: Average days from submission to today, for the jobs counted in Yet to Be Installed, Out of SLA.

SQL
select avg(current_date - (p.osc_660)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is null and current_date - (p.osc_687)::date > 43  -- not installed, Deal Review over 43 days ago

Pitfalls:

  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.

PTO Within SLA (Install, 30 Days)

Sr Staff Sr Staff Meeting Report: Key Metrics (PTO Within 30 Days tile); PTO Jobs Breakdown: PTO Within SLA · target 30 days from install

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: PTO Within SLA

Definition: Net sales submitted in the range whose PTO was approved within 30 days of install verified.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and (p.osc_676)::date - (p.osc_671)::date <= 30  -- PTO within 30 days of install

Pitfalls:

  • The report has two tiles titled PTO Within SLA: this one (from install) and the 73-day one (from Deal Review).
  • On Hold counts as a net sale; only Canceled and Cancellation in Progress (statuses 58, 59) drop out.

PTO Outside SLA (Install, 30 Days)

Sr Staff Sr Staff Meeting Report: Key Metrics (PTO Within 30 Days tile); PTO Jobs Breakdown: PTO Outside SLA · target 0

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: PTO Outside SLA

Definition: Net sales submitted in the range whose PTO was approved more than 30 days after install verified.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and (p.osc_676)::date - (p.osc_671)::date > 30  -- PTO over 30 days after install

Pitfalls: None beyond the report's rules.

Yet to Be PTO, Still Within SLA (Install, 30 Days)

Sr Staff Sr Staff Meeting Report: Key Metrics (waiting, still within); PTO Jobs Breakdown · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Waiting for PTO, within 30 days

Definition: Net sales submitted in the range, installed at most 30 days ago, with no PTO yet.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is not null and p.osc_676 is null and current_date - (p.osc_671)::date <= 30  -- installed at most 30 days ago, no PTO

Pitfalls:

  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.

Yet to Be PTO, Out of SLA (Install, 30 Days)

Sr Staff Sr Staff Meeting Report: Key Metrics (waiting past 30 days); PTO Jobs Breakdown · target 0
Sr Staff Sr Staff Drilldown: Total Accounts PTO · target 0

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Total Accounts PTO (Drilldown); waiting for PTO past 30 days

Definition: Net sales submitted in the range, installed more than 30 days ago, with no PTO yet.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is not null and p.osc_676 is null and current_date - (p.osc_671)::date > 30  -- installed over 30 days ago, no PTO

Pitfalls:

  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.
  • On Hold counts as a net sale; only Canceled and Cancellation in Progress (statuses 58, 59) drop out.

Avg Days M1 Approved to M2 Approved (PTO Within SLA)

Sr Staff Sr Staff Meeting Report: Avg Days, Install to PTO SLA, 30 Days · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Days Since Install (PTO Within SLA) (QuickSight's title)

Definition: Average days from M1 approved to M2 approved, for the jobs counted in PTO Within SLA (30 days).

SQL
select avg((p.osc_685)::date - (p.osc_682)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and (p.osc_676)::date - (p.osc_671)::date <= 30  -- PTO within 30 days of install

Pitfalls:

  • QuickSight titles it Days Since Install (PTO Within SLA) but averages M1 approved to M2 approved. Lumen retitles it.

Avg Days M1 Approved to M2 Approved (PTO Outside SLA)

Sr Staff Sr Staff Meeting Report: Avg Days, Install to PTO SLA, 30 Days · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Days Since Install (PTO Outside SLA) (QuickSight's title)

Definition: Average days from M1 approved to M2 approved, for the jobs counted in PTO Outside SLA (30 days).

SQL
select avg((p.osc_685)::date - (p.osc_682)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and (p.osc_676)::date - (p.osc_671)::date > 30  -- PTO over 30 days after install

Pitfalls:

  • Same mistitle as the Within version.

Days Since Install (Still Within SLA)

Sr Staff Sr Staff Meeting Report: Avg Days, Install to PTO SLA, 30 Days · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Days waiting for PTO, within 30 days

Definition: Average days from install verified to today, for the jobs counted in Yet to Be PTO, Still Within SLA (30 days).

SQL
select avg(current_date - (p.osc_671)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is not null and p.osc_676 is null and current_date - (p.osc_671)::date <= 30  -- installed at most 30 days ago, no PTO

Pitfalls:

  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.

Days Since Install (Out of SLA)

Sr Staff Sr Staff Meeting Report: Avg Days, Install to PTO SLA, 30 Days · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Days waiting for PTO, past 30 days

Definition: Average days from install verified to today, for the jobs counted in Yet to Be PTO, Out of SLA (30 days).

SQL
select avg(current_date - (p.osc_671)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is not null and p.osc_676 is null and current_date - (p.osc_671)::date > 30  -- installed over 30 days ago, no PTO

Pitfalls:

  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.

PTO Within SLA (Deal Review, 73 Days)

Sr Staff Sr Staff Meeting Report: Key Metrics (PTO Within 73 Days tile); Deal Review to PTO Breakdown: PTO Within SLA · target 73 days from Deal Review

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: PTO Within SLA (73 days)

Definition: Net sales submitted in the range whose PTO was approved within 73 days of Deal Review complete.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and (p.osc_676)::date - (p.osc_687)::date <= 73  -- PTO within 73 days of Deal Review

Pitfalls:

  • Not the Executive PTO sheet's Deal Review to PTO Within 73 Days (#), which is dated by Deal Review, not submission.
  • On Hold counts as a net sale; only Canceled and Cancellation in Progress (statuses 58, 59) drop out.

PTO Outside SLA (Deal Review, 73 Days)

Sr Staff Sr Staff Meeting Report: Key Metrics (PTO Within 73 Days tile); Deal Review to PTO Breakdown: PTO Outside SLA · target 0

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: PTO Outside SLA (73 days)

Definition: Net sales submitted in the range whose PTO was approved more than 73 days after Deal Review complete.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and (p.osc_676)::date - (p.osc_687)::date > 73  -- PTO over 73 days after Deal Review

Pitfalls:

  • Dated by submission (see PTO Within SLA, 73 days).

Yet to Be PTO, Still Within SLA (Deal Review, 73 Days)

Sr Staff Sr Staff Meeting Report: Key Metrics (waiting, still within); Deal Review to PTO Breakdown · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Waiting for PTO, within 73 days of Deal Review

Definition: Net sales submitted in the range with no PTO yet, whose Deal Review completed at most 73 days ago.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_687 is not null and p.osc_676 is null and current_date - (p.osc_687)::date <= 73  -- Deal Review at most 73 days ago, no PTO

Pitfalls:

  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.

Yet to Be PTO, Out of SLA (Deal Review, 73 Days)

Sr Staff Sr Staff Meeting Report: Key Metrics (waiting past 73 days); Deal Review to PTO Breakdown · target 0

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Waiting for PTO past 73 days of Deal Review

Definition: Net sales submitted in the range with no PTO yet, whose Deal Review completed more than 73 days ago.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_687 is not null and p.osc_676 is null and current_date - (p.osc_687)::date > 73  -- Deal Review over 73 days ago, no PTO

Pitfalls:

  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.

Avg Days Sale to PTO (PTO Within SLA)

Sr Staff Sr Staff Meeting Report: Avg Days, Deal Review to PTO SLA, 73 Days · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Days Since NTP (PTO Within SLA) (QuickSight's title)

Definition: Average days from submission to PTO approved, for the jobs counted in PTO Within SLA (73 days).

SQL
select avg((p.osc_676)::date - (p.osc_660)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and (p.osc_676)::date - (p.osc_687)::date <= 73  -- PTO within 73 days of Deal Review

Pitfalls:

  • QuickSight titles it Days Since NTP (PTO Within SLA) but averages submission to PTO; NTP plays no part. Lumen retitles it.

Avg Days Sale to PTO (PTO Outside SLA)

Sr Staff Sr Staff Meeting Report: Avg Days, Deal Review to PTO SLA, 73 Days · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Days Since NTP (PTO Outside SLA) (QuickSight's title)

Definition: Average days from submission to PTO approved, for the jobs counted in PTO Outside SLA (73 days).

SQL
select avg((p.osc_676)::date - (p.osc_660)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and (p.osc_676)::date - (p.osc_687)::date > 73  -- PTO over 73 days after Deal Review

Pitfalls:

  • Same mistitle as the Within version.

Avg Days Install to Today (Still Within SLA)

Sr Staff Sr Staff Meeting Report: Avg Days, Deal Review to PTO SLA, 73 Days · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Days Since NTP (Still Within SLA) (QuickSight's title)

Definition: Average days from install verified to today, for the jobs counted in Yet to Be PTO, Still Within SLA (73 days).

SQL
select avg(current_date - (p.osc_671)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_687 is not null and p.osc_676 is null and current_date - (p.osc_687)::date <= 73  -- Deal Review at most 73 days ago, no PTO

Pitfalls:

  • QuickSight titles it Days Since NTP, but it counts from install verified. Jobs not yet installed drop out of the average while still counted in the tile above.
  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.

Avg Days Install to Today (Out of SLA)

Sr Staff Sr Staff Meeting Report: Avg Days, Deal Review to PTO SLA, 73 Days · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Days Since NTP (Out of SLA) (QuickSight's title)

Definition: Average days from install verified to today, for the jobs counted in Yet to Be PTO, Out of SLA (73 days).

SQL
select avg(current_date - (p.osc_671)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_687 is not null and p.osc_676 is null and current_date - (p.osc_687)::date > 73  -- Deal Review over 73 days ago, no PTO

Pitfalls:

  • Same mistitle and gaps as the Within version.
  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.

Deal Review - PTO 25%

Sr Staff Sr Staff Meeting Report: Deal Review to PTO Percentiles · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: P25; Deal Review to PTO 25th percentile

Definition: The 25th percentile of days from Deal Review complete (else submission) to PTO approved, for projects PTO approved in the range whose Deal Review (or submission) fell this calendar year.

SQL
select percentile_cont(0.25) within group (order by d.days) as value
from data_map_1.dm_project_data p
cross join lateral (select (p.osc_676)::date - (coalesce(p.osc_687, p.osc_660))::date as days) d
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_676::date between :start_date and :end_date  -- PTO Approved
  and date_trunc('year', coalesce(p.osc_687, p.osc_660)) = date_trunc('year', current_date)
    and coalesce(p.osc_687, p.osc_660)::date <= current_date  -- Deal Review, else submission, this year
  and d.days between 0 and 1000  -- outside 0 to 1000 days is left out

Pitfalls:

  • Dated by PTO approved, unlike the rest of the sheet, and the report pins it to year to date whatever range is picked.
  • Falls back to the submitted date when there is no Deal Review, and drops values under 0 or over 1,000 days.
  • Counts canceled projects; not the Executive PTO sheet's P50/P75, which are net sales dated by Deal Review.

Deal Review - PTO 50%

Sr Staff Sr Staff Meeting Report: Projects by Days From Deal Review to PTO (P50 mark) · target 73 days (the histogram's SLA line)

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: P50; Deal Review to PTO 50th percentile

Definition: The 50th percentile of days from Deal Review complete (else submission) to PTO approved, for projects PTO approved in the range whose Deal Review (or submission) fell this calendar year.

SQL
select percentile_cont(0.5) within group (order by d.days) as value
from data_map_1.dm_project_data p
cross join lateral (select (p.osc_676)::date - (coalesce(p.osc_687, p.osc_660))::date as days) d
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_676::date between :start_date and :end_date  -- PTO Approved
  and date_trunc('year', coalesce(p.osc_687, p.osc_660)) = date_trunc('year', current_date)
    and coalesce(p.osc_687, p.osc_660)::date <= current_date  -- Deal Review, else submission, this year
  and d.days between 0 and 1000  -- outside 0 to 1000 days is left out

Pitfalls:

  • Dated by PTO approved, unlike the rest of the sheet, and the report pins it to year to date whatever range is picked.
  • Falls back to the submitted date when there is no Deal Review, and drops values under 0 or over 1,000 days.
  • Counts canceled projects; not the Executive PTO sheet's P50/P75, which are net sales dated by Deal Review.
  • A continuous percentile: with an even count it averages the two middle values.

Deal Review - PTO 75%

Sr Staff Sr Staff Meeting Report: Projects by Days From Deal Review to PTO (P75 mark) · target 73 days (the histogram's SLA line)

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: P75; Deal Review to PTO 75th percentile

Definition: The 75th percentile of days from Deal Review complete (else submission) to PTO approved, for projects PTO approved in the range whose Deal Review (or submission) fell this calendar year.

SQL
select percentile_cont(0.75) within group (order by d.days) as value
from data_map_1.dm_project_data p
cross join lateral (select (p.osc_676)::date - (coalesce(p.osc_687, p.osc_660))::date as days) d
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_676::date between :start_date and :end_date  -- PTO Approved
  and date_trunc('year', coalesce(p.osc_687, p.osc_660)) = date_trunc('year', current_date)
    and coalesce(p.osc_687, p.osc_660)::date <= current_date  -- Deal Review, else submission, this year
  and d.days between 0 and 1000  -- outside 0 to 1000 days is left out

Pitfalls:

  • Dated by PTO approved, unlike the rest of the sheet, and the report pins it to year to date whatever range is picked.
  • Falls back to the submitted date when there is no Deal Review, and drops values under 0 or over 1,000 days.
  • Counts canceled projects; not the Executive PTO sheet's P50/P75, which are net sales dated by Deal Review.

Deal Review - PTO 90%

Sr Staff Sr Staff Meeting Report: Deal Review to PTO Percentiles · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: P90; Deal Review to PTO 90th percentile

Definition: The 90th percentile of days from Deal Review complete (else submission) to PTO approved, for projects PTO approved in the range whose Deal Review (or submission) fell this calendar year.

SQL
select percentile_cont(0.9) within group (order by d.days) as value
from data_map_1.dm_project_data p
cross join lateral (select (p.osc_676)::date - (coalesce(p.osc_687, p.osc_660))::date as days) d
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_676::date between :start_date and :end_date  -- PTO Approved
  and date_trunc('year', coalesce(p.osc_687, p.osc_660)) = date_trunc('year', current_date)
    and coalesce(p.osc_687, p.osc_660)::date <= current_date  -- Deal Review, else submission, this year
  and d.days between 0 and 1000  -- outside 0 to 1000 days is left out

Pitfalls:

  • Dated by PTO approved, unlike the rest of the sheet, and the report pins it to year to date whatever range is picked.
  • Falls back to the submitted date when there is no Deal Review, and drops values under 0 or over 1,000 days.
  • Counts canceled projects; not the Executive PTO sheet's P50/P75, which are net sales dated by Deal Review.

Installed Within 43 Days of Deal Review

Sr Staff Sr Staff Meeting Report: Key Metrics · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Install SLA %

Definition: Of the projects submitted in the range that are installed, the share installed within 43 days of Deal Review complete.

SQL
select count(*) filter (where (p.osc_671)::date - (p.osc_687)::date <= 43)::numeric / nullif(count(*), 0) as value,
  count(*) filter (where (p.osc_671)::date - (p.osc_687)::date <= 43) as num, count(*) as den
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and ((p.osc_671)::date - (p.osc_687)::date <= 43 or (p.osc_671)::date - (p.osc_687)::date > 43)  -- installed, with a Deal Review

Pitfalls:

  • Lumen's own; QuickSight has no such tile.
  • Canceled jobs count, as in Installed Within and Outside SLA; jobs not yet installed are left out, so it says nothing about the backlog.

PTO Within 30 Days of Install

Sr Staff Sr Staff Meeting Report: Key Metrics · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: PTO SLA % (install)

Definition: Of the net sales submitted in the range that have PTO, the share approved within 30 days of install verified.

SQL
select count(*) filter (where (p.osc_676)::date - (p.osc_671)::date <= 30)::numeric / nullif(count(*), 0) as value,
  count(*) filter (where (p.osc_676)::date - (p.osc_671)::date <= 30) as num, count(*) as den
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and ((p.osc_676)::date - (p.osc_671)::date <= 30 or (p.osc_676)::date - (p.osc_671)::date > 30)  -- installed and PTO approved

Pitfalls:

  • Lumen's own; QuickSight has no such tile.
  • Jobs still waiting for PTO are left out, however late.

PTO Within 73 Days of Deal Review

Sr Staff Sr Staff Meeting Report: Key Metrics · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: PTO SLA % (Deal Review)

Definition: Of the net sales submitted in the range that have PTO, the share approved within 73 days of Deal Review complete.

SQL
select count(*) filter (where (p.osc_676)::date - (p.osc_687)::date <= 73)::numeric / nullif(count(*), 0) as value,
  count(*) filter (where (p.osc_676)::date - (p.osc_687)::date <= 73) as num, count(*) as den
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and ((p.osc_676)::date - (p.osc_687)::date <= 73 or (p.osc_676)::date - (p.osc_687)::date > 73)  -- Deal Review and PTO approved

Pitfalls:

  • Lumen's own. Not the Executive PTO sheet's Deal Review to PTO Within 73 Days (%), which is dated by Deal Review: this is dated by submission.
  • Jobs still waiting for PTO are left out.

Total Active Jobs

Sr Staff Sr Staff Meeting Report: Active Department Breakdown · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Active Job Count; jobs in department

Definition: Projects sitting in each department now, among those submitted in the range.

SQL
select d.department, count(distinct x.project_id) as value
from (select wqa.project_id, wq.work_queue_name, wqa.date_entered_wqt, wqa.date_exited_wqt, wqa.date_exited,
    p.object_status_id, p.osc_660,
    case when wq.work_queue_name like '%NEM%' then 'NEM'
      when wq.work_queue_name like '%PTO%' then 'PTO'
      when wq.work_queue_name like '%M1%' then 'M1'
      when wq.work_queue_name like '%M2%' then 'M2'
      when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
      when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
      when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
      when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
      else trim(wqt.work_queue_type) end as work_queue_type,
    case when wq.work_queue_name like '%NTP%' then 4
      when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
      when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
      when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
      when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
      when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
      when wqt.work_queue_type = 'Deal Review' then 4
      else wqt.sla_target end as sla_target,  -- working days
    row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
      order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
  from phoenix.work_queue_activity wqa
  left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
  left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
  left join data_map_1.dm_project_data p on p.project_id = wqa.project_id
  left join phoenix.state s on s.id = p.state_id
  left join phoenix.object_status o on o.id = p.object_status_id
  where p.archived = false
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and o.base_status_id not in (2, 3)
    and wq.exclude_from_wqt_metrics = false
    and p.osc_660::date between :start_date and :end_date  -- Project Submitted
) x
cross join lateral (select case lower(x.work_queue_type)
    when 'deal review' then '01 Deal Review' when 'zeo one' then '02 Zeo One' when 'field sales' then '03 Field Sales' when 'engineering' then '04 Engineering' when 'permitting' then '06 Permitting' when 'nem' then '07 NEM' when 'scheduling' then '10 Scheduling' when 'installation' then '14 Installation' when 'non-standard' then '15 Non-Standard' when 'm1' then '16 M1' when 'field audit' then '17 Field Audit' when 'inspection' then '18 Inspections' when 'pto' then '19 PTO' when 'm2' then '20 M2' when 'finalization' then '22 Finalization' end as department,
  (select count(*) from generate_series(x.date_entered_wqt::date, current_date, interval '1 day') g(day)
    where extract(isodow from g.day) < 6) as tid) d  -- working days in the department, both ends
where x.rn = 1  -- the latest stint in each queue type
  and x.date_entered_wqt is not null and x.date_exited_wqt is null and x.date_exited is null  -- still open
  and d.department is not null  -- the 15 reported departments
  and x.work_queue_name <> 'Vivint Smarthome'
  and (x.object_status_id <> 58 or x.work_queue_type = 'Retention')
  and (x.object_status_id <> 106 or x.work_queue_type in ('Deal Review', 'M1', 'Lost Funding'))
  and (x.work_queue_type = 'Customer Care' or not exists (select 1 from data_map_1.dm_pb_20_data cmp
    where cmp.project_id = x.project_id and cmp.object_status_id in (84, 207, 86)))  -- not in compliance
  and not (x.work_queue_type = 'Deal Review' and exists (select 1 from phoenix.work_queue_activity z  -- an open Zeo One stint
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One'
        and z.date_exited_wqt is null and zq.exclude_from_wqt_metrics = false))
  and not (x.work_queue_type = 'Field Audit' and exists (select 1 from phoenix.work_queue_activity z  -- an open Non-Standard stint
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard'
        and z.date_exited_wqt is null and zq.exclude_from_wqt_metrics = false))
group by d.department
order by d.department

Pitfalls:

  • As of today, for jobs submitted in the range (QuickSight's board is fixed to this year).
  • One row per department; only the 15 departments the sheet reports, and Vivint Smarthome is left out.
  • Canceled projects count only in Retention, status 106 only in Deal Review, M1 and Lost Funding, and projects in compliance only in Customer Care. A Deal Review stint is dropped while the project sits in Zeo One, and Field Audit while it sits in Non-Standard.

Active Jobs In SLA

Sr Staff Sr Staff Meeting Report: Active Department Breakdown · target the department's SLA Target

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: In SLA

Definition: Projects in each department whose working days there so far are at most the department's SLA target.

SQL
select d.department, count(distinct case when d.tid <= x.sla_target then x.project_id end) as value
from (select wqa.project_id, wq.work_queue_name, wqa.date_entered_wqt, wqa.date_exited_wqt, wqa.date_exited,
    p.object_status_id, p.osc_660,
    case when wq.work_queue_name like '%NEM%' then 'NEM'
      when wq.work_queue_name like '%PTO%' then 'PTO'
      when wq.work_queue_name like '%M1%' then 'M1'
      when wq.work_queue_name like '%M2%' then 'M2'
      when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
      when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
      when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
      when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
      else trim(wqt.work_queue_type) end as work_queue_type,
    case when wq.work_queue_name like '%NTP%' then 4
      when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
      when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
      when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
      when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
      when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
      when wqt.work_queue_type = 'Deal Review' then 4
      else wqt.sla_target end as sla_target,  -- working days
    row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
      order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
  from phoenix.work_queue_activity wqa
  left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
  left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
  left join data_map_1.dm_project_data p on p.project_id = wqa.project_id
  left join phoenix.state s on s.id = p.state_id
  left join phoenix.object_status o on o.id = p.object_status_id
  where p.archived = false
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and o.base_status_id not in (2, 3)
    and wq.exclude_from_wqt_metrics = false
    and p.osc_660::date between :start_date and :end_date  -- Project Submitted
) x
cross join lateral (select case lower(x.work_queue_type)
    when 'deal review' then '01 Deal Review' when 'zeo one' then '02 Zeo One' when 'field sales' then '03 Field Sales' when 'engineering' then '04 Engineering' when 'permitting' then '06 Permitting' when 'nem' then '07 NEM' when 'scheduling' then '10 Scheduling' when 'installation' then '14 Installation' when 'non-standard' then '15 Non-Standard' when 'm1' then '16 M1' when 'field audit' then '17 Field Audit' when 'inspection' then '18 Inspections' when 'pto' then '19 PTO' when 'm2' then '20 M2' when 'finalization' then '22 Finalization' end as department,
  (select count(*) from generate_series(x.date_entered_wqt::date, current_date, interval '1 day') g(day)
    where extract(isodow from g.day) < 6) as tid) d  -- working days in the department, both ends
where x.rn = 1  -- the latest stint in each queue type
  and x.date_entered_wqt is not null and x.date_exited_wqt is null and x.date_exited is null  -- still open
  and d.department is not null  -- the 15 reported departments
  and x.work_queue_name <> 'Vivint Smarthome'
  and (x.object_status_id <> 58 or x.work_queue_type = 'Retention')
  and (x.object_status_id <> 106 or x.work_queue_type in ('Deal Review', 'M1', 'Lost Funding'))
  and (x.work_queue_type = 'Customer Care' or not exists (select 1 from data_map_1.dm_pb_20_data cmp
    where cmp.project_id = x.project_id and cmp.object_status_id in (84, 207, 86)))  -- not in compliance
  and not (x.work_queue_type = 'Deal Review' and exists (select 1 from phoenix.work_queue_activity z  -- an open Zeo One stint
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One'
        and z.date_exited_wqt is null and zq.exclude_from_wqt_metrics = false))
  and not (x.work_queue_type = 'Field Audit' and exists (select 1 from phoenix.work_queue_activity z  -- an open Non-Standard stint
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard'
        and z.date_exited_wqt is null and zq.exclude_from_wqt_metrics = false))
group by d.department
order by d.department

Pitfalls:

  • SLA targets are working days (Monday to Friday, both ends counted), mostly the queue type's own target; NTP queues 4, M1 and M2 7, Not Ready to be Scheduled 30, Deal Review 4.
  • 19 PTO holds stints with targets 7 and 15; QuickSight splits it into two rows, Lumen shows one.

Active Jobs Out of SLA

Sr Staff Sr Staff Meeting Report: Active Department Breakdown · target 0

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Out of SLA

Definition: Projects in each department whose working days there so far pass the department's SLA target.

SQL
select d.department, count(distinct case when d.tid > x.sla_target then x.project_id end) as value
from (select wqa.project_id, wq.work_queue_name, wqa.date_entered_wqt, wqa.date_exited_wqt, wqa.date_exited,
    p.object_status_id, p.osc_660,
    case when wq.work_queue_name like '%NEM%' then 'NEM'
      when wq.work_queue_name like '%PTO%' then 'PTO'
      when wq.work_queue_name like '%M1%' then 'M1'
      when wq.work_queue_name like '%M2%' then 'M2'
      when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
      when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
      when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
      when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
      else trim(wqt.work_queue_type) end as work_queue_type,
    case when wq.work_queue_name like '%NTP%' then 4
      when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
      when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
      when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
      when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
      when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
      when wqt.work_queue_type = 'Deal Review' then 4
      else wqt.sla_target end as sla_target,  -- working days
    row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
      order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
  from phoenix.work_queue_activity wqa
  left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
  left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
  left join data_map_1.dm_project_data p on p.project_id = wqa.project_id
  left join phoenix.state s on s.id = p.state_id
  left join phoenix.object_status o on o.id = p.object_status_id
  where p.archived = false
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and o.base_status_id not in (2, 3)
    and wq.exclude_from_wqt_metrics = false
    and p.osc_660::date between :start_date and :end_date  -- Project Submitted
) x
cross join lateral (select case lower(x.work_queue_type)
    when 'deal review' then '01 Deal Review' when 'zeo one' then '02 Zeo One' when 'field sales' then '03 Field Sales' when 'engineering' then '04 Engineering' when 'permitting' then '06 Permitting' when 'nem' then '07 NEM' when 'scheduling' then '10 Scheduling' when 'installation' then '14 Installation' when 'non-standard' then '15 Non-Standard' when 'm1' then '16 M1' when 'field audit' then '17 Field Audit' when 'inspection' then '18 Inspections' when 'pto' then '19 PTO' when 'm2' then '20 M2' when 'finalization' then '22 Finalization' end as department,
  (select count(*) from generate_series(x.date_entered_wqt::date, current_date, interval '1 day') g(day)
    where extract(isodow from g.day) < 6) as tid) d  -- working days in the department, both ends
where x.rn = 1  -- the latest stint in each queue type
  and x.date_entered_wqt is not null and x.date_exited_wqt is null and x.date_exited is null  -- still open
  and d.department is not null  -- the 15 reported departments
  and x.work_queue_name <> 'Vivint Smarthome'
  and (x.object_status_id <> 58 or x.work_queue_type = 'Retention')
  and (x.object_status_id <> 106 or x.work_queue_type in ('Deal Review', 'M1', 'Lost Funding'))
  and (x.work_queue_type = 'Customer Care' or not exists (select 1 from data_map_1.dm_pb_20_data cmp
    where cmp.project_id = x.project_id and cmp.object_status_id in (84, 207, 86)))  -- not in compliance
  and not (x.work_queue_type = 'Deal Review' and exists (select 1 from phoenix.work_queue_activity z  -- an open Zeo One stint
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One'
        and z.date_exited_wqt is null and zq.exclude_from_wqt_metrics = false))
  and not (x.work_queue_type = 'Field Audit' and exists (select 1 from phoenix.work_queue_activity z  -- an open Non-Standard stint
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard'
        and z.date_exited_wqt is null and zq.exclude_from_wqt_metrics = false))
group by d.department
order by d.department

Pitfalls:

  • The board ranks departments by this, worst first.
  • Days count to today in UTC, so after 5 PM Mountain time a job can tip over a day early.

Active SLA %

Sr Staff Sr Staff Meeting Report: Active Department Breakdown · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: SLA %

Definition: In each department, Active Jobs In SLA over In SLA plus Out of SLA.

SQL
select d.department, count(distinct case when d.tid <= x.sla_target then x.project_id end)::numeric / nullif(count(distinct case when d.tid <= x.sla_target then x.project_id end) + count(distinct case when d.tid > x.sla_target then x.project_id end), 0) as value,
  count(distinct case when d.tid <= x.sla_target then x.project_id end) as num, count(distinct case when d.tid <= x.sla_target then x.project_id end) + count(distinct case when d.tid > x.sla_target then x.project_id end) as den
from (select wqa.project_id, wq.work_queue_name, wqa.date_entered_wqt, wqa.date_exited_wqt, wqa.date_exited,
    p.object_status_id, p.osc_660,
    case when wq.work_queue_name like '%NEM%' then 'NEM'
      when wq.work_queue_name like '%PTO%' then 'PTO'
      when wq.work_queue_name like '%M1%' then 'M1'
      when wq.work_queue_name like '%M2%' then 'M2'
      when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
      when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
      when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
      when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
      else trim(wqt.work_queue_type) end as work_queue_type,
    case when wq.work_queue_name like '%NTP%' then 4
      when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
      when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
      when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
      when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
      when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
      when wqt.work_queue_type = 'Deal Review' then 4
      else wqt.sla_target end as sla_target,  -- working days
    row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
      order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
  from phoenix.work_queue_activity wqa
  left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
  left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
  left join data_map_1.dm_project_data p on p.project_id = wqa.project_id
  left join phoenix.state s on s.id = p.state_id
  left join phoenix.object_status o on o.id = p.object_status_id
  where p.archived = false
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and o.base_status_id not in (2, 3)
    and wq.exclude_from_wqt_metrics = false
    and p.osc_660::date between :start_date and :end_date  -- Project Submitted
) x
cross join lateral (select case lower(x.work_queue_type)
    when 'deal review' then '01 Deal Review' when 'zeo one' then '02 Zeo One' when 'field sales' then '03 Field Sales' when 'engineering' then '04 Engineering' when 'permitting' then '06 Permitting' when 'nem' then '07 NEM' when 'scheduling' then '10 Scheduling' when 'installation' then '14 Installation' when 'non-standard' then '15 Non-Standard' when 'm1' then '16 M1' when 'field audit' then '17 Field Audit' when 'inspection' then '18 Inspections' when 'pto' then '19 PTO' when 'm2' then '20 M2' when 'finalization' then '22 Finalization' end as department,
  (select count(*) from generate_series(x.date_entered_wqt::date, current_date, interval '1 day') g(day)
    where extract(isodow from g.day) < 6) as tid) d  -- working days in the department, both ends
where x.rn = 1  -- the latest stint in each queue type
  and x.date_entered_wqt is not null and x.date_exited_wqt is null and x.date_exited is null  -- still open
  and d.department is not null  -- the 15 reported departments
  and x.work_queue_name <> 'Vivint Smarthome'
  and (x.object_status_id <> 58 or x.work_queue_type = 'Retention')
  and (x.object_status_id <> 106 or x.work_queue_type in ('Deal Review', 'M1', 'Lost Funding'))
  and (x.work_queue_type = 'Customer Care' or not exists (select 1 from data_map_1.dm_pb_20_data cmp
    where cmp.project_id = x.project_id and cmp.object_status_id in (84, 207, 86)))  -- not in compliance
  and not (x.work_queue_type = 'Deal Review' and exists (select 1 from phoenix.work_queue_activity z  -- an open Zeo One stint
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One'
        and z.date_exited_wqt is null and zq.exclude_from_wqt_metrics = false))
  and not (x.work_queue_type = 'Field Audit' and exists (select 1 from phoenix.work_queue_activity z  -- an open Non-Standard stint
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard'
        and z.date_exited_wqt is null and zq.exclude_from_wqt_metrics = false))
group by d.department
order by d.department

Pitfalls:

  • A project with two open stints in one department (two queue types that map to it) can count both in and out: for October 2026 submissions, 16 M1 held 12 jobs, 12 in SLA and 1 out.

Active TID

Sr Staff Sr Staff Meeting Report: Active Department Breakdown · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Time in department; active time in dept

Definition: Average working days, Monday to Friday with both ends counted, from entering each department to today.

SQL
select d.department, avg(d.tid) as value
from (select wqa.project_id, wq.work_queue_name, wqa.date_entered_wqt, wqa.date_exited_wqt, wqa.date_exited,
    p.object_status_id, p.osc_660,
    case when wq.work_queue_name like '%NEM%' then 'NEM'
      when wq.work_queue_name like '%PTO%' then 'PTO'
      when wq.work_queue_name like '%M1%' then 'M1'
      when wq.work_queue_name like '%M2%' then 'M2'
      when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
      when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
      when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
      when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
      else trim(wqt.work_queue_type) end as work_queue_type,
    case when wq.work_queue_name like '%NTP%' then 4
      when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
      when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
      when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
      when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
      when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
      when wqt.work_queue_type = 'Deal Review' then 4
      else wqt.sla_target end as sla_target,  -- working days
    row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
      order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
  from phoenix.work_queue_activity wqa
  left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
  left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
  left join data_map_1.dm_project_data p on p.project_id = wqa.project_id
  left join phoenix.state s on s.id = p.state_id
  left join phoenix.object_status o on o.id = p.object_status_id
  where p.archived = false
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and o.base_status_id not in (2, 3)
    and wq.exclude_from_wqt_metrics = false
    and p.osc_660::date between :start_date and :end_date  -- Project Submitted
) x
cross join lateral (select case lower(x.work_queue_type)
    when 'deal review' then '01 Deal Review' when 'zeo one' then '02 Zeo One' when 'field sales' then '03 Field Sales' when 'engineering' then '04 Engineering' when 'permitting' then '06 Permitting' when 'nem' then '07 NEM' when 'scheduling' then '10 Scheduling' when 'installation' then '14 Installation' when 'non-standard' then '15 Non-Standard' when 'm1' then '16 M1' when 'field audit' then '17 Field Audit' when 'inspection' then '18 Inspections' when 'pto' then '19 PTO' when 'm2' then '20 M2' when 'finalization' then '22 Finalization' end as department,
  (select count(*) from generate_series(x.date_entered_wqt::date, current_date, interval '1 day') g(day)
    where extract(isodow from g.day) < 6) as tid) d  -- working days in the department, both ends
where x.rn = 1  -- the latest stint in each queue type
  and x.date_entered_wqt is not null and x.date_exited_wqt is null and x.date_exited is null  -- still open
  and d.department is not null  -- the 15 reported departments
  and x.work_queue_name <> 'Vivint Smarthome'
  and (x.object_status_id <> 58 or x.work_queue_type = 'Retention')
  and (x.object_status_id <> 106 or x.work_queue_type in ('Deal Review', 'M1', 'Lost Funding'))
  and (x.work_queue_type = 'Customer Care' or not exists (select 1 from data_map_1.dm_pb_20_data cmp
    where cmp.project_id = x.project_id and cmp.object_status_id in (84, 207, 86)))  -- not in compliance
  and not (x.work_queue_type = 'Deal Review' and exists (select 1 from phoenix.work_queue_activity z  -- an open Zeo One stint
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One'
        and z.date_exited_wqt is null and zq.exclude_from_wqt_metrics = false))
  and not (x.work_queue_type = 'Field Audit' and exists (select 1 from phoenix.work_queue_activity z  -- an open Non-Standard stint
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard'
        and z.date_exited_wqt is null and zq.exclude_from_wqt_metrics = false))
group by d.department
order by d.department

Pitfalls:

  • Counts from when the project entered the department (queue type), not the queue, so moves between queues in one department don't reset it.
  • Working days; Total TID on the same board is calendar days.

Days Since Sale (Active Jobs, Median)

Sr Staff Sr Staff Meeting Report: Active Department Breakdown · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Days Since Sale (board)

Definition: The median days from submission to today of the jobs in each department.

SQL
select d.department, percentile_cont(0.5) within group (order by current_date - (x.osc_660)::date) as value
from (select wqa.project_id, wq.work_queue_name, wqa.date_entered_wqt, wqa.date_exited_wqt, wqa.date_exited,
    p.object_status_id, p.osc_660,
    case when wq.work_queue_name like '%NEM%' then 'NEM'
      when wq.work_queue_name like '%PTO%' then 'PTO'
      when wq.work_queue_name like '%M1%' then 'M1'
      when wq.work_queue_name like '%M2%' then 'M2'
      when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
      when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
      when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
      when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
      else trim(wqt.work_queue_type) end as work_queue_type,
    case when wq.work_queue_name like '%NTP%' then 4
      when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
      when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
      when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
      when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
      when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
      when wqt.work_queue_type = 'Deal Review' then 4
      else wqt.sla_target end as sla_target,  -- working days
    row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
      order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
  from phoenix.work_queue_activity wqa
  left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
  left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
  left join data_map_1.dm_project_data p on p.project_id = wqa.project_id
  left join phoenix.state s on s.id = p.state_id
  left join phoenix.object_status o on o.id = p.object_status_id
  where p.archived = false
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and o.base_status_id not in (2, 3)
    and wq.exclude_from_wqt_metrics = false
    and p.osc_660::date between :start_date and :end_date  -- Project Submitted
) x
cross join lateral (select case lower(x.work_queue_type)
    when 'deal review' then '01 Deal Review' when 'zeo one' then '02 Zeo One' when 'field sales' then '03 Field Sales' when 'engineering' then '04 Engineering' when 'permitting' then '06 Permitting' when 'nem' then '07 NEM' when 'scheduling' then '10 Scheduling' when 'installation' then '14 Installation' when 'non-standard' then '15 Non-Standard' when 'm1' then '16 M1' when 'field audit' then '17 Field Audit' when 'inspection' then '18 Inspections' when 'pto' then '19 PTO' when 'm2' then '20 M2' when 'finalization' then '22 Finalization' end as department,
  (select count(*) from generate_series(x.date_entered_wqt::date, current_date, interval '1 day') g(day)
    where extract(isodow from g.day) < 6) as tid) d  -- working days in the department, both ends
where x.rn = 1  -- the latest stint in each queue type
  and x.date_entered_wqt is not null and x.date_exited_wqt is null and x.date_exited is null  -- still open
  and d.department is not null  -- the 15 reported departments
  and x.work_queue_name <> 'Vivint Smarthome'
  and (x.object_status_id <> 58 or x.work_queue_type = 'Retention')
  and (x.object_status_id <> 106 or x.work_queue_type in ('Deal Review', 'M1', 'Lost Funding'))
  and (x.work_queue_type = 'Customer Care' or not exists (select 1 from data_map_1.dm_pb_20_data cmp
    where cmp.project_id = x.project_id and cmp.object_status_id in (84, 207, 86)))  -- not in compliance
  and not (x.work_queue_type = 'Deal Review' and exists (select 1 from phoenix.work_queue_activity z  -- an open Zeo One stint
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One'
        and z.date_exited_wqt is null and zq.exclude_from_wqt_metrics = false))
  and not (x.work_queue_type = 'Field Audit' and exists (select 1 from phoenix.work_queue_activity z  -- an open Non-Standard stint
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard'
        and z.date_exited_wqt is null and zq.exclude_from_wqt_metrics = false))
group by d.department
order by d.department

Pitfalls:

  • "Sale" is Project Submitted (OSC 660).
  • A median, one value per open stint.
  • QuickSight's split 19 PTO rows can't be merged into one median, so Lumen's 19 PTO figure has no QuickSight twin.

Out of SLA Installs: Clean Sales

Sr Staff Sr Staff Drilldown: Yet to Be Installed, Out of SLA: Clean Sales · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Clean Sales (Drilldown)

Definition: Of the jobs waiting for install past 43 days from Deal Review, those Deal Review marked clean.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is null and current_date - (p.osc_687)::date > 43  -- not installed, Deal Review over 43 days ago
  and p.osc_1991 = true  -- Clean Sale

Pitfalls:

  • Narrows Yet to Be Installed, Out of SLA (Deal Review over 43 days ago, not installed, net, submitted in the range).

Out of SLA Installs: Dirty Sales

Sr Staff Sr Staff Drilldown: Yet to Be Installed, Out of SLA: Dirty Sales · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Dirty Sales (Drilldown)

Definition: Of the jobs waiting for install past 43 days from Deal Review, those Deal Review marked not clean.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is null and current_date - (p.osc_687)::date > 43  -- not installed, Deal Review over 43 days ago
  and p.osc_1991 = false  -- Clean Sale unchecked

Pitfalls:

  • Narrows Yet to Be Installed, Out of SLA (Deal Review over 43 days ago, not installed, net, submitted in the range).
  • Clean plus Dirty can fall short of Total Accounts: jobs with no verdict are in neither.

Out of SLA Installs: Avg Days Since Sale

Sr Staff Sr Staff Drilldown: Yet to Be Installed, Out of SLA: Avg Days Since Sale · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Avg Days Since Sale (Drilldown)

Definition: Average days from submission to today, for the jobs waiting for install past 43 days from Deal Review.

SQL
select avg(current_date - (p.osc_660)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is null and current_date - (p.osc_687)::date > 43  -- not installed, Deal Review over 43 days ago

Pitfalls:

  • Narrows Yet to Be Installed, Out of SLA (Deal Review over 43 days ago, not installed, net, submitted in the range).
  • The same figure as Days Since Sale (Out of SLA) on the Meeting Report.
  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.

Out of SLA Installs: Past 90 Days Since Sale

Sr Staff Sr Staff Drilldown: Yet to Be Installed, Out of SLA: Past 90 Days Since Sale · target 0

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Past 90 Days Since Sale

Definition: Of the jobs waiting for install past 43 days from Deal Review, those submitted 90 or more days ago.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is null and current_date - (p.osc_687)::date > 43  -- not installed, Deal Review over 43 days ago
  and current_date - (p.osc_660)::date >= 90

Pitfalls:

  • Narrows Yet to Be Installed, Out of SLA (Deal Review over 43 days ago, not installed, net, submitted in the range).
  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.

Out of SLA Installs: Blocked / Hold

Sr Staff Sr Staff Drilldown: Yet to Be Installed, Out of SLA: Blocked / Hold · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Blocked / Hold

Definition: Of the jobs waiting for install past 43 days from Deal Review, those in an On Hold status.

SQL
select count(*) as value
from data_map_1.dm_project_data p
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is null and current_date - (p.osc_687)::date > 43  -- not installed, Deal Review over 43 days ago
  and b.base_status = 'ON HOLD'

Pitfalls:

  • Narrows Yet to Be Installed, Out of SLA (Deal Review over 43 days ago, not installed, net, submitted in the range).
  • Any status whose base status is On Hold.

Out of SLA PTO: Clean Sales

Sr Staff Sr Staff Drilldown: Yet to Be PTO, Out of SLA: Clean Sales · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Clean Sales (Drilldown PTO)

Definition: Of the installed jobs waiting for PTO past 30 days, those Deal Review marked clean.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is not null and p.osc_676 is null and current_date - (p.osc_671)::date > 30  -- installed over 30 days ago, no PTO
  and p.osc_1991 = true  -- Clean Sale

Pitfalls:

  • Narrows Yet to Be PTO, Out of SLA (installed over 30 days ago, no PTO, net, submitted in the range).

Out of SLA PTO: Dirty Sales

Sr Staff Sr Staff Drilldown: Yet to Be PTO, Out of SLA: Dirty Sales · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Dirty Sales (Drilldown PTO)

Definition: Of the installed jobs waiting for PTO past 30 days, those Deal Review marked not clean.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is not null and p.osc_676 is null and current_date - (p.osc_671)::date > 30  -- installed over 30 days ago, no PTO
  and p.osc_1991 = false  -- Clean Sale unchecked

Pitfalls:

  • Narrows Yet to Be PTO, Out of SLA (installed over 30 days ago, no PTO, net, submitted in the range).

Out of SLA PTO: Avg Days Since Sale

Sr Staff Sr Staff Drilldown: Yet to Be PTO, Out of SLA: Avg Days Since Sale PTO · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Avg Days Since Sale PTO

Definition: Average days from submission to today, for the installed jobs waiting for PTO past 30 days.

SQL
select avg(current_date - (p.osc_660)::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is not null and p.osc_676 is null and current_date - (p.osc_671)::date > 30  -- installed over 30 days ago, no PTO

Pitfalls:

  • Narrows Yet to Be PTO, Out of SLA (installed over 30 days ago, no PTO, net, submitted in the range).
  • From submission, not from install, though the SLA counts from install.
  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.

Out of SLA PTO: Past 60 Days Since Install

Sr Staff Sr Staff Drilldown: Yet to Be PTO, Out of SLA: Past 60 Days Since Install · target 0

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Past 60 Days Since Install

Definition: Of the installed jobs waiting for PTO past 30 days, those installed 60 or more days ago.

SQL
select count(*) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is not null and p.osc_676 is null and current_date - (p.osc_671)::date > 30  -- installed over 30 days ago, no PTO
  and current_date - (p.osc_671)::date >= 60

Pitfalls:

  • Narrows Yet to Be PTO, Out of SLA (installed over 30 days ago, no PTO, net, submitted in the range).
  • Counted to today: the figure for a past range keeps moving as jobs install or reach PTO.

Out of SLA PTO: Blocked / Hold

Sr Staff Sr Staff Drilldown: Yet to Be PTO, Out of SLA: Blocked / Hold PTO · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Blocked / Hold PTO

Definition: Of the installed jobs waiting for PTO past 30 days, those in an On Hold status.

SQL
select count(*) as value
from data_map_1.dm_project_data p
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")
  and p.object_status_id not in (58, 59)  -- net sale: not Cancellation in Progress or Canceled
  and p.osc_671 is not null and p.osc_676 is null and current_date - (p.osc_671)::date > 30  -- installed over 30 days ago, no PTO
  and b.base_status = 'ON HOLD'

Pitfalls:

  • Narrows Yet to Be PTO, Out of SLA (installed over 30 days ago, no PTO, net, submitted in the range).

Perfect Packet (or Sale) to PTO: Average Days

Sr Staff Sr Staff Drilldown: Avg Days From Deal Review to PTO by AHJ · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Perfect Packet to PTO (Drilldown)

Definition: Average days from Deal Review complete, else submission, to PTO approved, for projects submitted in the range.

SQL
select avg((p.osc_676)::date - (coalesce(p.osc_687, p.osc_660))::date) as value
from data_map_1.dm_project_data p
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted (the report's "Project Sold")

Pitfalls:

  • Falls back to the submitted date without a Deal Review, and keeps negative days and canceled jobs; the Executive Dashboard's Perfect Packet to PTO counts a PTO before Deal Review as 0 and is Residential only.
  • Drawn by AHJ on the sheet.

NTP Approved - M2 Approved (Last 60 Days by PTO)

Sr Staff Financier Timelines: NTP Approved - M2 Approved (Average Last 60 Days) tile · target none

Also called: NTP Approved - M2 Approved (Average Last 60 Days); ntp_approved_to_pto

Definition: Average days from M0 (NTP) approved to M2 approved, for open projects whose PTO was approved in the range.

SQL
select avg((p.osc_685)::date - (p.osc_680)::date) as value
from data_map_1.dm_project_data p
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'
  and o.object_status in ('Engineering', 'Finalization', 'Finalized', 'Inspection', 'Installation', 'Installation Prep', 'On Hold',
    'Pending Change Order', 'Pending Engineering Review', 'Pending Revision', 'Qualification', 'Sales Hold')  -- open statuses
  and not exists (select 1 from data_map_1.dm_pb_20_data cmp where cmp.project_id = p.project_id and cmp.object_status_id in (84, 207, 86))  -- not in compliance
  and p.osc_676::date between :start_date and :end_date

Pitfalls:

  • The tile reads the last 60 days to today, not the page's range.
  • Dated by PTO approved, though it measures NTP to M2: projects PTO'd but not yet M2 approved drop out.
  • QuickSight's field is named ntp_approved_to_pto; Lumen follows the tile's title (NTP to M2), Brendan 2026-11-30.
  • QuickSight opens on LightReach only; Lumen and this SQL count every financier (filter on the main contract's financier, OSC 849, to match).
  • Only projects in an open status (Engineering through Sales Hold, Finalized included), not canceled and not in compliance. Legal Hold is listed but never counts, because it means compliance.
  • QuickSight also drops Lumio jobs (Is Lumio = 0); Lumen counts them.

NTP Approved - M1 Approved (Last 60 Days by IV)

Sr Staff Financier Timelines: NTP Approved - M1 Approved (Average Last 60 Days) tile · target none

Also called: NTP Approved - M1 Approved (Average Last 60 Days); ntp_approved_to_install_verified

Definition: Average days from M0 (NTP) approved to M1 approved, for open projects whose install was verified in the range.

SQL
select avg((p.osc_682)::date - (p.osc_680)::date) as value
from data_map_1.dm_project_data p
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'
  and o.object_status in ('Engineering', 'Finalization', 'Finalized', 'Inspection', 'Installation', 'Installation Prep', 'On Hold',
    'Pending Change Order', 'Pending Engineering Review', 'Pending Revision', 'Qualification', 'Sales Hold')  -- open statuses
  and not exists (select 1 from data_map_1.dm_pb_20_data cmp where cmp.project_id = p.project_id and cmp.object_status_id in (84, 207, 86))  -- not in compliance
  and p.osc_671::date between :start_date and :end_date

Pitfalls:

  • The tile reads the last 60 days to today.
  • Dated by install verified while measuring NTP to M1.
  • QuickSight counted project 27757 twice in October 2026; Lumen counts it once.
  • QuickSight opens on LightReach only; Lumen and this SQL count every financier (filter on the main contract's financier, OSC 849, to match).
  • Only projects in an open status (Engineering through Sales Hold, Finalized included), not canceled and not in compliance. Legal Hold is listed but never counts, because it means compliance.
  • QuickSight also drops Lumio jobs (Is Lumio = 0); Lumen counts them.

M1 Approved - M2 Approved (Last 60 Days by PTO)

Sr Staff Financier Timelines: M1 Approved - M2 Approved (Average Last 60 Days) tile · target none

Also called: M1 Approved - M2 Approved (Average Last 60 Days); install_verified_to_pto_approved

Definition: Average days from M1 approved to M2 approved, for open projects whose PTO was approved in the range.

SQL
select avg((p.osc_685)::date - (p.osc_682)::date) as value
from data_map_1.dm_project_data p
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'
  and o.object_status in ('Engineering', 'Finalization', 'Finalized', 'Inspection', 'Installation', 'Installation Prep', 'On Hold',
    'Pending Change Order', 'Pending Engineering Review', 'Pending Revision', 'Qualification', 'Sales Hold')  -- open statuses
  and not exists (select 1 from data_map_1.dm_pb_20_data cmp where cmp.project_id = p.project_id and cmp.object_status_id in (84, 207, 86))  -- not in compliance
  and p.osc_676::date between :start_date and :end_date

Pitfalls:

  • The tile reads the last 60 days to today.
  • QuickSight's field is named install_verified_to_pto_approved; the tile averages M1 to M2, as its title says.
  • QuickSight opens on LightReach only; Lumen and this SQL count every financier (filter on the main contract's financier, OSC 849, to match).
  • Only projects in an open status (Engineering through Sales Hold, Finalized included), not canceled and not in compliance. Legal Hold is listed but never counts, because it means compliance.
  • QuickSight also drops Lumio jobs (Is Lumio = 0); Lumen counts them.

NTP to M2 Approved: Average Days by M2 Date

Sr Staff Financier Timelines: Avg Days From NTP to M2 (60-day rolling line) · target none

Also called: NTP Approved - M2 Approved (Rolling 60 Days Average); ntp_to_pto_rolling_60

Definition: Average days from M0 (NTP) approved to M2 approved, for open projects M2 approved in the range.

SQL
select avg((p.osc_685)::date - (p.osc_680)::date) as value
from data_map_1.dm_project_data p
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'
  and o.object_status in ('Engineering', 'Finalization', 'Finalized', 'Inspection', 'Installation', 'Installation Prep', 'On Hold',
    'Pending Change Order', 'Pending Engineering Review', 'Pending Revision', 'Qualification', 'Sales Hold')  -- open statuses
  and not exists (select 1 from data_map_1.dm_pb_20_data cmp where cmp.project_id = p.project_id and cmp.object_status_id in (84, 207, 86))  -- not in compliance
  and p.osc_685::date between :start_date and :end_date

Pitfalls:

  • The line plots this over a rolling 60 days for each week of the last 22; QuickSight's window averages 60 buckets (months), so the two lines differ.
  • QuickSight opens on LightReach only; Lumen and this SQL count every financier (filter on the main contract's financier, OSC 849, to match).
  • Only projects in an open status (Engineering through Sales Hold, Finalized included), not canceled and not in compliance. Legal Hold is listed but never counts, because it means compliance.
  • QuickSight also drops Lumio jobs (Is Lumio = 0); Lumen counts them.

NTP to M1 Approved: Average Days by M1 Date

Sr Staff Financier Timelines: Avg Days From NTP to M1 (60-day rolling line) · target none

Also called: NTP - M1 Approved Trend (Rolling 60 Days Average); ntp_to_m1_rolling_60

Definition: Average days from M0 (NTP) approved to M1 approved, for open projects M1 approved in the range.

SQL
select avg((p.osc_682)::date - (p.osc_680)::date) as value
from data_map_1.dm_project_data p
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'
  and o.object_status in ('Engineering', 'Finalization', 'Finalized', 'Inspection', 'Installation', 'Installation Prep', 'On Hold',
    'Pending Change Order', 'Pending Engineering Review', 'Pending Revision', 'Qualification', 'Sales Hold')  -- open statuses
  and not exists (select 1 from data_map_1.dm_pb_20_data cmp where cmp.project_id = p.project_id and cmp.object_status_id in (84, 207, 86))  -- not in compliance
  and p.osc_682::date between :start_date and :end_date

Pitfalls:

  • Rolling-line caveat as NTP to M2.
  • QuickSight opens on LightReach only; Lumen and this SQL count every financier (filter on the main contract's financier, OSC 849, to match).
  • Only projects in an open status (Engineering through Sales Hold, Finalized included), not canceled and not in compliance. Legal Hold is listed but never counts, because it means compliance.
  • QuickSight also drops Lumio jobs (Is Lumio = 0); Lumen counts them.

M1 to M2 Approved: Average Days by M2 Date

Sr Staff Financier Timelines: Avg Days From M1 to M2 (60-day rolling line) · target none

Also called: M1 Approved - M2 Approved (Rolling 60 Days Average); m1_to_m2_rolling_60

Definition: Average days from M1 approved to M2 approved, for open projects M2 approved in the range.

SQL
select avg((p.osc_685)::date - (p.osc_682)::date) as value
from data_map_1.dm_project_data p
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'
  and o.object_status in ('Engineering', 'Finalization', 'Finalized', 'Inspection', 'Installation', 'Installation Prep', 'On Hold',
    'Pending Change Order', 'Pending Engineering Review', 'Pending Revision', 'Qualification', 'Sales Hold')  -- open statuses
  and not exists (select 1 from data_map_1.dm_pb_20_data cmp where cmp.project_id = p.project_id and cmp.object_status_id in (84, 207, 86))  -- not in compliance
  and p.osc_685::date between :start_date and :end_date

Pitfalls:

  • Rolling-line caveat as NTP to M2.
  • QuickSight opens on LightReach only; Lumen and this SQL count every financier (filter on the main contract's financier, OSC 849, to match).
  • Only projects in an open status (Engineering through Sales Hold, Finalized included), not canceled and not in compliance. Legal Hold is listed but never counts, because it means compliance.
  • QuickSight also drops Lumio jobs (Is Lumio = 0); Lumen counts them.

Delivery Date - M1 Submitted: Average Days

Sr Staff Delivery Date Analysis: Delivery Date - M1 Submitted tile and line · target the median (the tile compares the two)

Also called: Delivery to M1 submitted

Definition: Average days from the day after the first material delivery to M1 submitted, for projects M1 submitted in the range.

SQL
select avg(greatest((p.osc_681)::date - (dd.plus1)::date, 0)) as value
from data_map_1.dm_project_data p
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
cross join lateral (select (select min(e41.osc_1167) from data_map_1.dm_ev_41_data e41
    where e41.project_id = p.project_id)::date + 1 as plus1) dd  -- first material delivery + 1 day
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status in ('ACTIVE', 'ON HOLD')
  and p.osc_681::date between :start_date and :end_date

Pitfalls:

  • M1 submitted before delivery counts as 0 days.
  • Only projects Active or On Hold today: a job that has since finalized or canceled drops out of past weeks.
  • Delivery is the earliest material delivery date on the project's install appointments (event 41, OSC 1167), plus one day.
  • M1 Submitted is the project milestone (OSC 681), the first submission; resubmissions don't move it.
  • October 2026 read 22.12 days on 2026-11-30 and 21.80 on 2026-12-02: jobs that finalized in between dropped out. QuickSight also counted project 27757 twice that month.

Delivery Date - M1 Submitted: Median Days

Sr Staff Delivery Date Analysis: Delivery Date - M1 Submitted tile (target) and line · target none

Also called: Median delivery to M1 submitted

Definition: Median days from the day after the first material delivery to M1 submitted, for projects M1 submitted in the range.

SQL
select percentile_cont(0.5) within group (order by greatest((p.osc_681)::date - (dd.plus1)::date, 0)) as value
from data_map_1.dm_project_data p
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
cross join lateral (select (select min(e41.osc_1167) from data_map_1.dm_ev_41_data e41
    where e41.project_id = p.project_id)::date + 1 as plus1) dd  -- first material delivery + 1 day
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status in ('ACTIVE', 'ON HOLD')
  and p.osc_681::date between :start_date and :end_date

Pitfalls:

  • M1 before delivery counts as 0.
  • Only projects Active or On Hold today: a job that has since finalized or canceled drops out of past weeks.
  • Delivery is the earliest material delivery date on the project's install appointments (event 41, OSC 1167), plus one day.
  • M1 Submitted is the project milestone (OSC 681), the first submission; resubmissions don't move it.

Jobs Still Within 15 Day Window

Sr Staff Delivery Date Analysis: Jobs Still Within 15 Day Window tile · target none

Also called: Delivered, M1 not submitted, within 15 days

Definition: Active or On Hold projects with materials delivered 0 to 15 days ago (counting from the day after delivery) and no M1 submitted.

SQL
select count(*) as value
from data_map_1.dm_project_data p
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
cross join lateral (select (select min(e41.osc_1167) from data_map_1.dm_ev_41_data e41
    where e41.project_id = p.project_id)::date + 1 as plus1) dd  -- first material delivery + 1 day
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status in ('ACTIVE', 'ON HOLD')
  and p.osc_681 is null  -- M1 not submitted
  and dd.plus1 >= date '2016-06-01'
  and dd.plus1 <= current_date
  and current_date - (dd.plus1)::date <= 15

Pitfalls:

  • As of today: the page's dates don't apply.
  • Days count from the day after delivery, so a job delivered 16 days ago is still within.
  • Delivery is the earliest material delivery date on the project's install appointments (event 41, OSC 1167), plus one day.

Jobs Outside of 15 Day Window

Sr Staff Delivery Date Analysis: Jobs Outside of 15 Day Window tile; Jobs at Risk table · target 0

Also called: Jobs at risk; delivered, M1 not submitted, past 15 days

Definition: Active or On Hold projects with materials delivered more than 15 days ago (from the day after delivery) and no M1 submitted.

SQL
select count(*) as value
from data_map_1.dm_project_data p
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
cross join lateral (select (select min(e41.osc_1167) from data_map_1.dm_ev_41_data e41
    where e41.project_id = p.project_id)::date + 1 as plus1) dd  -- first material delivery + 1 day
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status in ('ACTIVE', 'ON HOLD')
  and p.osc_681 is null  -- M1 not submitted
  and dd.plus1 >= date '2016-06-01'
  and dd.plus1 <= current_date
  and current_date - (dd.plus1)::date > 15

Pitfalls:

  • As of today: the page's dates don't apply.
  • Old stale jobs sit here for years: deliveries back to 2016 count.
  • Delivery is the earliest material delivery date on the project's install appointments (event 41, OSC 1167), plus one day.

Scope Review Blocks Requested

Engineering Dashboard Volume & SLAs: By Step (Scope Review: Requested); Volume by Work Type (Scope Review: Requested, by work type) · target none

Also called: Scope Review requested; scope reviews in

Definition: Scope Review blocks of Work Type Fresh, Revision and As-Built opened in the range, whatever their status.

SQL
select count(*) as value
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and s.date_created::date between :start_date and :end_date  -- Block Opened Date

Pitfalls:

  • Dated by Block Opened Date, while Done is dated by Block Completed Date, so the two cover different blocks.
  • A scope review with no Plan Set Version yet has no Work Type and isn't counted until its version is set: 37 of the 192 scope reviews opened in October 2026 had none on 2026-12-02.
  • QuickSight shows requested only as each Completed tile's target, and its visual filters keep only blocks that later closed QC Passed (plan sets) or Complete (stamps), so an open or failed block is never "requested" there (Conflict 5).

Scope Review Blocks Done

Engineering Dashboard Volume & SLAs: By Step (Scope Review: Done); Volume by Work Type (Scope Review: Done, by work type) · target none
Engineering Dashboard Volume & SLAs (QuickSight): Total Scopes Completed tile and its per-work-type tiles · target requested

Also called: Scope Review completed; scope reviews out

Definition: Scope Review blocks of Work Type Fresh, Revision and As-Built closed Complete, by the day they first closed.

SQL
select count(*) as value
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • "Completed" is the block's first close in the block audit. Scope reviews and stamps close as Complete or Canceled, so a block first canceled and later reopened and completed is dated by the cancel and never counts as done (3 scope reviews since 2026-02-15).
  • Lumen counts every block. QuickSight's matching tile also requires a named completer (and, on plan sets, QC Passed only), so its October 2026 counts differ (Conflict 5). October 2026: 151 both ways.

Scope Review Net (Done Less Requested)

Engineering Dashboard Volume & SLAs: By Step (Scope Review: Net); Volume by Work Type (Scope Review: Net) · target 0 or more

Also called: Net; out vs in

Definition: Scope Review blocks done in the range less those requested in the range; below 0, the backlog grew.

SQL
select (select count(*)
  from data_map_1.dm_pb_5_data s  -- Scope Review blocks
  join data_map_1.dm_project_data p on p.project_id = s.project_id
  left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
  cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
        when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
        - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  where s.date_created >= date '2026-02-15'  -- the datasets' date floor
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and x.work_type in ('Fresh', 'Revision', 'As-Built')
    and cl.object_status_id = 8  -- first close was Complete
    and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date
  ) - (select count(*)
  from data_map_1.dm_pb_5_data s  -- Scope Review blocks
  join data_map_1.dm_project_data p on p.project_id = s.project_id
  left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
  cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
        when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
        - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  where s.date_created >= date '2026-02-15'  -- the datasets' date floor
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and x.work_type in ('Fresh', 'Revision', 'As-Built')
    and s.date_created::date between :start_date and :end_date  -- Block Opened Date
  ) as value

Pitfalls:

  • A difference of two populations on two dates, not a backlog count: blocks requested in the range can finish after it, and blocks done in it were often requested before it.
  • Monthly Review shows the same idea as a ratio (Out vs In) over Engineering Cycles' plan sets, every work type, target 100% (Conflict 5).

Scope Review Within SLA (%)

Engineering Dashboard Volume & SLAs: Spine reading "Scope Review · Within one day"; Share Within SLA by Week; By Step (Within SLA); Volume by Work Type (Within SLA, by work type) · target 80%
Engineering Dashboard Volume & SLAs (QuickSight): Scope Review % within SLA tile · target 80%

Also called: % within 1 Day SLA; Scope Review within SLA

Definition: Of the scope reviews done in the range, the share finished within 1 working day of opening.

SQL
select avg(case when x.tat <= 1 then 1.0 else 0 end) as value,
  sum(case when x.tat <= 1 then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • The clock runs from the scope review block's own opening, not from the scope review or the sale.
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.
  • "Completed" is the block's first close in the block audit. Scope reviews and stamps close as Complete or Canceled, so a block first canceled and later reopened and completed is dated by the cancel and never counts as done (3 scope reviews since 2026-02-15).
  • QuickSight's tile narrows the blocks to named people, so it differs: October 2026, QuickSight 77.9% (its 50-name roster, any closed status), Lumen 69.5% (Conflict 10).

Scope Review Median Turnaround

Engineering Dashboard Volume & SLAs: By Step (Scope Review: Median turnaround); Turnaround by Step (Scope Review box) · target 1 working day

Also called: Scope Review TAT; turnaround

Definition: Median working days from opening a scope review to its first close, over the scope reviews done in the range.

SQL
select percentile_cont(0.5) within group (order by x.tat) as value
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • Lumen judges the SLA against the median; QuickSight sets it as the target on the average and on an average that drops blocks over 7 working days (Conflict 11).
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.

Scope Review Average Turnaround

Engineering Dashboard Volume & SLAs: By Step (Scope Review: Average turnaround) · target none
Engineering Dashboard Volume & SLAs (QuickSight): Scope Review All TAT, Week Days Only tile · target 1 working day

Also called: All TAT (Week Days Only); TAT (Network Days)

Definition: Average working days from opening a scope review to its first close, over the scope reviews done in the range.

SQL
select avg(x.tat) as value
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • A few stuck jobs (resurveys, change orders) pull the average far above the median: October 2026 averaged 5.61 working days against a median of 0.50.
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.

Scope Review Blocks Over 7 Working Days

Engineering Dashboard Volume & SLAs: By Step (Scope Review: Over 7 days) · target none

Also called: Over 7 days

Definition: Scope Review blocks done in the range that took more than 7 working days from opening.

SQL
select count(*) as value
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date
  and x.tat > 7

Pitfalls:

  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.

Plan Set Blocks Requested

Engineering Dashboard Volume & SLAs: By Step (Plan Set: Requested); Volume by Work Type (Plan Set: Requested, by work type) · target none
Monthly Review Engineering Out vs In: Plan Sets In · target none

Also called: Plan Set requested; plan sets in

Definition: Plan Set blocks of Work Type Fresh, Revision and As-Built opened in the range, whatever their status.

SQL
select count(*) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
      - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and b.date_created::date between :start_date and :end_date  -- Block Opened Date

Pitfalls:

  • Dated by Block Opened Date, while Done is dated by Block Completed Date, so the two cover different blocks.
  • QuickSight shows requested only as each Completed tile's target, and its visual filters keep only blocks that later closed QC Passed (plan sets) or Complete (stamps), so an open or failed block is never "requested" there (Conflict 5).

Plan Set Blocks Done

Engineering Dashboard Volume & SLAs: By Step (Plan Set: Done); Volume by Work Type (Plan Set: Done, by work type) · target none
Engineering Dashboard Volume & SLAs (QuickSight): Total Plans Completed tile and its per-work-type tiles · target requested
Monthly Review Engineering Out vs In: Plan Sets Out · target none

Also called: Plan Set completed; plan sets out

Definition: Plan Set blocks of Work Type Fresh, Revision and As-Built closed QC Passed or QC Failed, by the day they first closed.

SQL
select count(*) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
      - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and cl.object_status_id is not null  -- closed QC Passed or QC Failed
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • "Completed" is the block's first close in the block audit. Scope reviews and stamps close as Complete or Canceled, so a block first canceled and later reopened and completed is dated by the cancel and never counts as done (3 scope reviews since 2026-02-15).
  • Lumen counts every block. QuickSight's matching tile also requires a named completer (and, on plan sets, QC Passed only), so its October 2026 counts differ (Conflict 5). October 2026: QuickSight 158, Lumen 177.

Plan Set Net (Done Less Requested)

Engineering Dashboard Volume & SLAs: By Step (Plan Set: Net); Volume by Work Type (Plan Set: Net) · target 0 or more

Also called: Net; out vs in

Definition: Plan Set blocks done in the range less those requested in the range; below 0, the backlog grew.

SQL
select (select count(*)
  from data_map_1.dm_pb_6_data b  -- Plan Set blocks
  join data_map_1.dm_project_data p on p.project_id = b.project_id
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
  left join (select distinct au.project_process_block_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
  cross join lateral (select case when b.osc_2520 is not null then
          case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
        when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
        else 'Fresh' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
        - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  where b.date_created >= date '2026-02-15'  -- the datasets' date floor
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and x.work_type in ('Fresh', 'Revision', 'As-Built')
    and cl.object_status_id is not null  -- closed QC Passed or QC Failed
    and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date
  ) - (select count(*)
  from data_map_1.dm_pb_6_data b  -- Plan Set blocks
  join data_map_1.dm_project_data p on p.project_id = b.project_id
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
  left join (select distinct au.project_process_block_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
  cross join lateral (select case when b.osc_2520 is not null then
          case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
        when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
        else 'Fresh' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
        - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  where b.date_created >= date '2026-02-15'  -- the datasets' date floor
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and x.work_type in ('Fresh', 'Revision', 'As-Built')
    and b.date_created::date between :start_date and :end_date  -- Block Opened Date
  ) as value

Pitfalls:

  • A difference of two populations on two dates, not a backlog count: blocks requested in the range can finish after it, and blocks done in it were often requested before it.
  • Monthly Review shows the same idea as a ratio (Out vs In) over Engineering Cycles' plan sets, every work type, target 100% (Conflict 5).

Plan Set Within SLA (%)

Engineering Dashboard Volume & SLAs: Spine reading "Plan Set · Within a day and a half"; Share Within SLA by Week; By Step (Within SLA); Volume by Work Type (Within SLA, by work type) · target 80%
Engineering Dashboard Volume & SLAs (QuickSight): Plan Set % within SLA tile · target 80%

Also called: % within 1.5 Day SLA; Plan Set within SLA

Definition: Of the plan sets done in the range, the share finished within 1.5 working days of opening.

SQL
select avg(case when x.tat <= 1.5 then 1.0 else 0 end) as value,
  sum(case when x.tat <= 1.5 then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
      - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and cl.object_status_id is not null  -- closed QC Passed or QC Failed
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • The clock runs from the plan set block's own opening, not from the scope review or the sale.
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.
  • "Completed" is the block's first close in the block audit. Scope reviews and stamps close as Complete or Canceled, so a block first canceled and later reopened and completed is dated by the cancel and never counts as done (3 scope reviews since 2026-02-15).
  • QuickSight's tile narrows the blocks to named people, so it differs: October 2026, QuickSight 53.7% (named agents and 8 named drafters), Lumen 78.0% (Conflict 10).

Plan Set Median Turnaround

Engineering Dashboard Volume & SLAs: By Step (Plan Set: Median turnaround); Turnaround by Step (Plan Set box) · target 1.5 working days

Also called: Plan Set TAT; turnaround

Definition: Median working days from opening a plan set to its first close, over the plan sets done in the range.

SQL
select percentile_cont(0.5) within group (order by x.tat) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
      - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and cl.object_status_id is not null  -- closed QC Passed or QC Failed
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • Lumen judges the SLA against the median; QuickSight sets it as the target on the average and on an average that drops blocks over 7 working days (Conflict 11).
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.

Plan Set Average Turnaround

Engineering Dashboard Volume & SLAs: By Step (Plan Set: Average turnaround) · target none
Engineering Dashboard Volume & SLAs (QuickSight): Plan Set All TAT, Week Days Only tile · target 1.5 working days

Also called: All TAT (Week Days Only); TAT (Network Days)

Definition: Average working days from opening a plan set to its first close, over the plan sets done in the range.

SQL
select avg(x.tat) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
      - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and cl.object_status_id is not null  -- closed QC Passed or QC Failed
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • A few stuck jobs (resurveys, change orders) pull the average far above the median: October 2026 averaged 2.26 working days against a median of 0.72.
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.
  • QuickSight's tile counts only plan sets drawn by 8 named drafters and QC'd by 8 named checkers: it read 6.46 for October 2026 against Lumen's 2.26.

Plan Set Blocks Over 7 Working Days

Engineering Dashboard Volume & SLAs: By Step (Plan Set: Over 7 days) · target none

Also called: Over 7 days

Definition: Plan Set blocks done in the range that took more than 7 working days from opening.

SQL
select count(*) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
      - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and cl.object_status_id is not null  -- closed QC Passed or QC Failed
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date
  and x.tat > 7

Pitfalls:

  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.

Engineering Stamps Blocks Requested

Engineering Dashboard Volume & SLAs: By Step (Engineering Stamps: Requested); Volume by Work Type (Engineering Stamps: Requested, by work type) · target none

Also called: Engineering Stamps requested; stamp requests in

Definition: Engineering Stamps blocks of Work Type Fresh and Restamp opened in the range, whatever their status.

SQL
select count(*) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
cross join lateral (select case when e.osc_2575 is not null then
        case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
      - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where e.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Restamp')
  and e.date_created::date between :start_date and :end_date  -- Block Opened Date

Pitfalls:

  • Dated by Block Opened Date, while Done is dated by Block Completed Date, so the two cover different blocks.
  • Only Fresh and Restamp stamps count. A stamps block whose copied Plan Set Version isn't REV0 is Revision or As-Built and drops out: 57 of the 157 stamps blocks first closed Complete in October 2026. Restamp applies only when no version was copied.
  • QuickSight shows requested only as each Completed tile's target, and its visual filters keep only blocks that later closed QC Passed (plan sets) or Complete (stamps), so an open or failed block is never "requested" there (Conflict 5).

Engineering Stamps Blocks Done

Engineering Dashboard Volume & SLAs: By Step (Engineering Stamps: Done); Volume by Work Type (Engineering Stamps: Done, by work type) · target none
Engineering Dashboard Volume & SLAs (QuickSight): Total Stamps Completed tile and its per-work-type tiles · target requested

Also called: Engineering Stamps completed; stamp requests out

Definition: Engineering Stamps blocks of Work Type Fresh and Restamp closed Complete, by the day they first closed.

SQL
select count(*) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
cross join lateral (select case when e.osc_2575 is not null then
        case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
      - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where e.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Restamp')
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • "Completed" is the block's first close in the block audit. Scope reviews and stamps close as Complete or Canceled, so a block first canceled and later reopened and completed is dated by the cancel and never counts as done (3 scope reviews since 2026-02-15).
  • Lumen counts every block. QuickSight's matching tile also requires a named completer (and, on plan sets, QC Passed only), so its October 2026 counts differ (Conflict 5). October 2026: QuickSight 99, Lumen 100.
  • Only Fresh and Restamp stamps count. A stamps block whose copied Plan Set Version isn't REV0 is Revision or As-Built and drops out: 57 of the 157 stamps blocks first closed Complete in October 2026. Restamp applies only when no version was copied.

Engineering Stamps Net (Done Less Requested)

Engineering Dashboard Volume & SLAs: By Step (Engineering Stamps: Net); Volume by Work Type (Engineering Stamps: Net) · target 0 or more

Also called: Net; out vs in

Definition: Engineering Stamps blocks done in the range less those requested in the range; below 0, the backlog grew.

SQL
select (select count(*)
  from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
  join data_map_1.dm_project_data p on p.project_id = e.project_id
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
  left join (select distinct au.project_process_block_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
  cross join lateral (select case when e.osc_2575 is not null then
          case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
        when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
        else 'Fresh' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
        - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  where e.date_created >= date '2026-02-15'  -- the datasets' date floor
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and x.work_type in ('Fresh', 'Restamp')
    and cl.object_status_id = 8  -- first close was Complete
    and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date
  ) - (select count(*)
  from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
  join data_map_1.dm_project_data p on p.project_id = e.project_id
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
  left join (select distinct au.project_process_block_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
  cross join lateral (select case when e.osc_2575 is not null then
          case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
        when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
        else 'Fresh' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
        - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  where e.date_created >= date '2026-02-15'  -- the datasets' date floor
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and x.work_type in ('Fresh', 'Restamp')
    and e.date_created::date between :start_date and :end_date  -- Block Opened Date
  ) as value

Pitfalls:

  • A difference of two populations on two dates, not a backlog count: blocks requested in the range can finish after it, and blocks done in it were often requested before it.
  • Monthly Review shows the same idea as a ratio (Out vs In) over Engineering Cycles' plan sets, every work type, target 100% (Conflict 5).

Engineering Stamps Within SLA (%)

Engineering Dashboard Volume & SLAs: Spine reading "Engineering Stamps · Within half a day"; Share Within SLA by Week; By Step (Within SLA); Volume by Work Type (Within SLA, by work type) · target 80%
Engineering Dashboard Volume & SLAs (QuickSight): Engineering Stamps % within SLA tile · target 80%

Also called: % within 0.5 Day SLA; Engineering Stamps within SLA

Definition: Of the stamp requests done in the range, the share finished within 0.5 working days of opening.

SQL
select avg(case when x.tat <= 0.5 then 1.0 else 0 end) as value,
  sum(case when x.tat <= 0.5 then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
cross join lateral (select case when e.osc_2575 is not null then
        case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
      - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where e.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Restamp')
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • The clock runs from the stamp request block's own opening, not from the scope review or the sale.
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.
  • "Completed" is the block's first close in the block audit. Scope reviews and stamps close as Complete or Canceled, so a block first canceled and later reopened and completed is dated by the cancel and never counts as done (3 scope reviews since 2026-02-15).
  • QuickSight's tile narrows the blocks to named people, so it differs: October 2026, 78.0% both ways (Conflict 10).
  • Only Fresh and Restamp stamps count. A stamps block whose copied Plan Set Version isn't REV0 is Revision or As-Built and drops out: 57 of the 157 stamps blocks first closed Complete in October 2026. Restamp applies only when no version was copied.

Engineering Stamps Median Turnaround

Engineering Dashboard Volume & SLAs: By Step (Engineering Stamps: Median turnaround); Turnaround by Step (Engineering Stamps box) · target 0.5 working days

Also called: Engineering Stamps TAT; turnaround

Definition: Median working days from opening a stamp request to its first close, over the stamp requests done in the range.

SQL
select percentile_cont(0.5) within group (order by x.tat) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
cross join lateral (select case when e.osc_2575 is not null then
        case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
      - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where e.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Restamp')
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • Lumen judges the SLA against the median; QuickSight sets it as the target on the average and on an average that drops blocks over 7 working days (Conflict 11).
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.

Engineering Stamps Average Turnaround

Engineering Dashboard Volume & SLAs: By Step (Engineering Stamps: Average turnaround) · target none
Engineering Dashboard Volume & SLAs (QuickSight): Engineering Stamps All TAT, Week Days Only tile · target 0.5 working days

Also called: All TAT (Week Days Only); TAT (Network Days)

Definition: Average working days from opening a stamp request to its first close, over the stamp requests done in the range.

SQL
select avg(x.tat) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
cross join lateral (select case when e.osc_2575 is not null then
        case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
      - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where e.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Restamp')
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • A few stuck jobs (resurveys, change orders) pull the average far above the median: October 2026 averaged 0.29 working days against a median of 0.10.
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.
  • Only Fresh and Restamp stamps count. A stamps block whose copied Plan Set Version isn't REV0 is Revision or As-Built and drops out: 57 of the 157 stamps blocks first closed Complete in October 2026. Restamp applies only when no version was copied.

Engineering Stamps Blocks Over 7 Working Days

Engineering Dashboard Volume & SLAs: By Step (Engineering Stamps: Over 7 days) · target none

Also called: Over 7 days

Definition: Engineering Stamps blocks done in the range that took more than 7 working days from opening.

SQL
select count(*) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
cross join lateral (select case when e.osc_2575 is not null then
        case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
      - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where e.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Restamp')
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date
  and x.tat > 7

Pitfalls:

  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.
  • Only Fresh and Restamp stamps count. A stamps block whose copied Plan Set Version isn't REV0 is Revision or As-Built and drops out: 57 of the 157 stamps blocks first closed Complete in October 2026. Restamp applies only when no version was copied.

Scope Review Turnaround, Calendar Days

Engineering Dashboard Volume & SLAs (QuickSight only): Scope Review All TAT, Open to Closed tile · target 1 day

Also called: All TAT (Open to Closed); TAT (True)

Definition: Average calendar days, weekends included, from opening a scope review to its first close, over the scope reviews done in the range.

SQL
select avg(trunc(extract(epoch from cl.changed_at - s.date_created)) / 86400.0) as value
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date

Pitfalls:

  • Not on Lumen's page: Lumen computes it only to match QuickSight.
  • Weekends count, so it always reads higher than the working-day figures.

Scope Review Turnaround, Outliers Removed

Engineering Dashboard Volume & SLAs (QuickSight only): Scope Review All TAT, WD - Filtered tile · target 1 working day

Also called: All TAT (WD - Filtered); TAT (Network Days - Outliers Removed)

Definition: Average working days from opening a scope review to its first close, leaving out blocks that took over 7 working days.

SQL
select avg(x.tat) filter (where x.tat <= 7) as value
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date

Pitfalls:

  • Not on Lumen's page. The 7-day cutoff hides exactly the jobs that blow the SLA; QuickSight notes it removes "extreme outliers caused by change orders/resurveys".

Fresh Scope Review Turnaround, Outliers Removed

Engineering Dashboard Volume & SLAs (QuickSight only): Scope Review Fresh TAT, WD - Filtered tile · target 1 working day

Also called: Fresh TAT (WD - Filtered)

Definition: Average working days from opening a Fresh scope review to its first close, leaving out blocks that took over 7 working days.

SQL
select avg(x.tat) filter (where x.tat <= 7) as value
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type = 'Fresh'
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date

Pitfalls:

  • Not on Lumen's page.

Plan Set Turnaround, Calendar Days

Engineering Dashboard Volume & SLAs (QuickSight only): Plan Set All TAT, Open to Closed tile · target 1.5 days

Also called: All TAT (Open to Closed); TAT (True)

Definition: Average calendar days, weekends included, from opening a plan set to its first close, over the plan sets done in the range.

SQL
select avg(trunc(extract(epoch from cl.changed_at - b.date_created)) / 86400.0) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
      - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
left join phoenix.user_position upc on upc.id = b.osc_454  -- Plan Set Created By
left join phoenix."user" uc on uc.id = upc.user_id
left join phoenix.user_position upq on upq.id = b.osc_471  -- QC Completed By
left join phoenix."user" uq on uq.id = upq.user_id
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and cl.object_status_id is not null  -- closed QC Passed or QC Failed
  and cl.changed_at::date between :start_date and :end_date
  and concat(uc.first_name, ' ', uc.last_name) in ('Alejandra Tapasco', 'Austin Teasdale', 'Brendan Fillmore', 'Cassidy Massey', 'Dallin Varner', 'Devan Thompson', 'Jacob Massey', 'PremiumCAD  ')  -- one of the sheet's 8 named drafters
  and concat(uq.first_name, ' ', uq.last_name) in ('Alejandra Tapasco', 'Austin Teasdale', 'Brendan Fillmore', 'Cassidy Massey', 'Dallin Varner', 'Devan Thompson', 'Devin Sanchez', 'Jacob Massey')  -- one of its 8 named checkers

Pitfalls:

  • Not on Lumen's page: Lumen computes it only to match QuickSight.
  • Weekends count, so it always reads higher than the working-day figures.
  • Plan sets count only when drawn by one of 8 named drafters ("PremiumCAD" among them) and, except the All TAT (WD - Filtered) tile, QC'd by one of 8 named checkers; a new hire is invisible until someone edits the list.

Plan Set Turnaround, Outliers Removed

Engineering Dashboard Volume & SLAs (QuickSight only): Plan Set All TAT, WD - Filtered tile · target 1.5 working days

Also called: All TAT (WD - Filtered); TAT (Network Days - Outliers Removed)

Definition: Average working days from opening a plan set to its first close, leaving out blocks that took over 7 working days.

SQL
select avg(x.tat) filter (where x.tat <= 7) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
      - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
left join phoenix.user_position upc on upc.id = b.osc_454  -- Plan Set Created By
left join phoenix."user" uc on uc.id = upc.user_id
left join phoenix.user_position upq on upq.id = b.osc_471  -- QC Completed By
left join phoenix."user" uq on uq.id = upq.user_id
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Revision', 'As-Built')
  and cl.object_status_id is not null  -- closed QC Passed or QC Failed
  and cl.changed_at::date between :start_date and :end_date
  and concat(uc.first_name, ' ', uc.last_name) in ('Alejandra Tapasco', 'Austin Teasdale', 'Brendan Fillmore', 'Cassidy Massey', 'Dallin Varner', 'Devan Thompson', 'Jacob Massey', 'PremiumCAD  ')  -- one of the sheet's 8 named drafters

Pitfalls:

  • Not on Lumen's page. The 7-day cutoff hides exactly the jobs that blow the SLA; QuickSight notes it removes "extreme outliers caused by change orders/resurveys".
  • Plan sets count only when drawn by one of 8 named drafters ("PremiumCAD" among them); a new hire is invisible until someone edits the list.

Fresh Plan Set Turnaround, Outliers Removed

Engineering Dashboard Volume & SLAs (QuickSight only): Plan Set Fresh TAT, WD - Filtered tile · target 1.5 working days

Also called: Fresh TAT (WD - Filtered)

Definition: Average working days from opening a Fresh plan set to its first close, leaving out blocks that took over 7 working days.

SQL
select avg(x.tat) filter (where x.tat <= 7) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
      - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
left join phoenix.user_position upc on upc.id = b.osc_454  -- Plan Set Created By
left join phoenix."user" uc on uc.id = upc.user_id
left join phoenix.user_position upq on upq.id = b.osc_471  -- QC Completed By
left join phoenix."user" uq on uq.id = upq.user_id
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type = 'Fresh'
  and cl.object_status_id is not null  -- closed QC Passed or QC Failed
  and cl.changed_at::date between :start_date and :end_date
  and concat(uc.first_name, ' ', uc.last_name) in ('Alejandra Tapasco', 'Austin Teasdale', 'Brendan Fillmore', 'Cassidy Massey', 'Dallin Varner', 'Devan Thompson', 'Jacob Massey', 'PremiumCAD  ')  -- one of the sheet's 8 named drafters
  and concat(uq.first_name, ' ', uq.last_name) in ('Alejandra Tapasco', 'Austin Teasdale', 'Brendan Fillmore', 'Cassidy Massey', 'Dallin Varner', 'Devan Thompson', 'Devin Sanchez', 'Jacob Massey')  -- one of its 8 named checkers

Pitfalls:

  • Not on Lumen's page.
  • Plan sets count only when drawn by one of 8 named drafters ("PremiumCAD" among them) and, except the All TAT (WD - Filtered) tile, QC'd by one of 8 named checkers; a new hire is invisible until someone edits the list.

Engineering Stamps Turnaround, Calendar Days

Engineering Dashboard Volume & SLAs (QuickSight only): Engineering Stamps All TAT, Open to Closed tile · target 1 day

Also called: All TAT (Open to Closed); TAT (True)

Definition: Average calendar days, weekends included, from opening a stamp request to its first close, over the stamp requests done in the range.

SQL
select avg(trunc(extract(epoch from cl.changed_at - e.date_created)) / 86400.0) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
cross join lateral (select case when e.osc_2575 is not null then
        case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
      - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where e.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Restamp')
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date

Pitfalls:

  • Not on Lumen's page: Lumen computes it only to match QuickSight.
  • Weekends count, so it always reads higher than the working-day figures.

Engineering Stamps Turnaround, Outliers Removed

Engineering Dashboard Volume & SLAs (QuickSight only): Engineering Stamps All TAT, WD - Filtered tile · target 0.5 working days

Also called: All TAT (WD - Filtered); TAT (Network Days - Outliers Removed)

Definition: Average working days from opening a stamp request to its first close, leaving out blocks that took over 7 working days.

SQL
select avg(x.tat) filter (where x.tat <= 7) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
cross join lateral (select case when e.osc_2575 is not null then
        case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
      - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where e.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh', 'Restamp')
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date

Pitfalls:

  • Not on Lumen's page. The 7-day cutoff hides exactly the jobs that blow the SLA; QuickSight notes it removes "extreme outliers caused by change orders/resurveys".

Fresh Engineering Stamps Turnaround, Outliers Removed

Engineering Dashboard Volume & SLAs (QuickSight only): Engineering Stamps Fresh TAT, WD - Filtered tile · target 0.5 working days

Also called: Fresh TAT (WD - Filtered)

Definition: Average working days from opening a Fresh stamp request to its first close, leaving out blocks that took over 7 working days.

SQL
select avg(x.tat) filter (where x.tat <= 7) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
cross join lateral (select case when e.osc_2575 is not null then
        case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
      - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where e.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type = 'Fresh'
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date

Pitfalls:

  • Not on Lumen's page.

Fresh Plan Set QC Pass Rate

Engineering Dashboard Volume & SLAs: QC Pass Rate tiles (Fresh plan sets) · target 90%
Engineering Dashboard Volume & SLAs (QuickSight): Fresh QC Pass Rate · target 90%

Also called: Fresh QC Pass Rate; QC Pass Rate

Definition: Of the fresh plan sets that QC closed in the range, the share QC passed, counting a pass with a small fix.

SQL
select avg(case when qr.list_value in ('Pass', 'Fix') then 1.0 else 0 end) as value,
  sum(case when qr.list_value in ('Pass', 'Fix') then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
      - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Fresh')
  and cl.object_status_id is not null  -- closed QC Passed or QC Failed
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • "Pass with Feedback" and a blank QC Result count as fails here; PremiumCAD's QC pass rate counts Pass with Feedback as a pass and skips blanks (Conflict 3). 21 plan sets since 2026-02-15 carry Pass with Feedback.
  • Dated by the plan set's first QC close, so a plan set QC failed and later passed counts once, as the first result recorded on the block today.

Revision Plan Set QC Pass Rate

Engineering Dashboard Volume & SLAs: QC Pass Rate tiles (Revision and As-Built plan sets) · target 95%
Engineering Dashboard Volume & SLAs (QuickSight): Revised QC Pass Rate · target 95%

Also called: Revised QC Pass Rate; QC Pass Rate

Definition: Of the revision and as-built plan sets that QC closed in the range, the share QC passed, counting a pass with a small fix.

SQL
select avg(case when qr.list_value in ('Pass', 'Fix') then 1.0 else 0 end) as value,
  sum(case when qr.list_value in ('Pass', 'Fix') then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
      - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type in ('Revision', 'As-Built')
  and cl.object_status_id is not null  -- closed QC Passed or QC Failed
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • "Pass with Feedback" and a blank QC Result count as fails here; PremiumCAD's QC pass rate counts Pass with Feedback as a pass and skips blanks (Conflict 3). 21 plan sets since 2026-02-15 carry Pass with Feedback.
  • Dated by the plan set's first QC close, so a plan set QC failed and later passed counts once, as the first result recorded on the block today.

Overall Plan Set QC Pass Rate

Engineering Dashboard Volume & SLAs: QC Pass Rate tiles (All plan sets); Spine reading "Plan Set · QC pass rate" · target 90%
Engineering Dashboard Volume & SLAs (QuickSight): Overall QC Pass Rate · target 90%

Also called: Overall QC Pass Rate; QC Pass Rate

Definition: Of the all plan sets that QC closed in the range, the share QC passed, counting a pass with a small fix.

SQL
select avg(case when qr.list_value in ('Pass', 'Fix') then 1.0 else 0 end) as value,
  sum(case when qr.list_value in ('Pass', 'Fix') then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
      - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and cl.object_status_id is not null  -- closed QC Passed or QC Failed
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • "Pass with Feedback" and a blank QC Result count as fails here; PremiumCAD's QC pass rate counts Pass with Feedback as a pass and skips blanks (Conflict 3). 21 plan sets since 2026-02-15 carry Pass with Feedback.
  • Dated by the plan set's first QC close, so a plan set QC failed and later passed counts once, as the first result recorded on the block today.

Plan Sets by QC Feedback Category

Engineering Dashboard Volume & SLAs: Plan Sets by QC Feedback Category · target none
Engineering Dashboard Volume & SLAs (QuickSight): QC Feedback Categories waterfall · target none

Also called: QC feedback categories

Definition: Plan sets QC closed in the range, counted under each QC Feedback Category QC picked.

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
      - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
join phoenix.list_value lv on lv.id = any(b.osc_473)  -- each QC Feedback Category picked
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and cl.object_status_id is not null  -- closed QC Passed or QC Failed
  and cl.changed_at::date between :start_date and :end_date  -- Block Completed Date
group by lv.list_value
order by value desc

Pitfalls:

  • A plan set with several categories counts under each; QuickSight's SQL kept only the first pick, so its bars run lower (accepted 2026-11-23).
  • Lumen draws seven categories: System/Equipment, Non-Standard Work, Interconnection, Install Principles, Bill of Materials, BOS Locations, AHJ/Utility & Requirements.

Share of Plan Sets Drawn In-House

Engineering Dashboard Volume & SLAs: Spine reading "Plan Set · Share drawn in-house"; Plan Set table (Drawn In-House) · target none
Monthly Review Summary Slide; Share Created In-House slide: meter and by-month line · target 85%

Also called: Share drawn in-house; Share Created In-House

Definition: Of the plan sets that first closed in the range, the share on Supernova (in-house) jobs.

SQL
select avg(case when x2.supernova then 1.0 else 0 end) as value,
  sum(case when x2.supernova then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
      else 'Fresh' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
      - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
join phoenix.project_process_block ppb on ppb.id = b.project_process_block_id
cross join lateral (select b.date_created >= date '2026-10-07' and not ppb.archived
    and not exists (select 1 from phoenix.project_owner po  -- Third Party Vendor is PremiumCAD
      join phoenix.user_position up on up.id = po.user_position_id
      join phoenix."user" u on u.id = up.user_id
      where po.project_id = p.project_id and po.owner_type_assignment_id in (17, 23) and po.archived = false
        and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%')
    and not exists (select 1 from data_map_1.dm_pb_7_data e7  -- PremiumCAD stamped since 2026-10-07
      join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
      where e7.project_id = p.project_id and e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%') as supernova) x2
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and cl.object_status_id is not null
  and cl.changed_at::date between :start_date and :end_date  -- Closed

Pitfalls:

  • In-house is Supernova Savings' job rule (a plan set opened since 2026-10-07 on a job with no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then), not who drew the plan set. The old draft's rule (a creator who isn't PremiumCAD) is out of date.
  • Every plan set opened before 2026-10-07 counts as not in-house, so a range before October reads 0%, October 2026 read 26% (46 of 177).
  • Monthly Review's Share Created In-House is the same figure with a target of 85%.

Scope Review to Stamps: Median Working Days

Engineering Dashboard Volume & SLAs: Turnaround by Step (Scope to Stamps row) · target 3 working days

Also called: Scope to Stamps; end to end

Definition: Median working days from opening a job's scope review to its stamps first closing Complete, over stamps blocks closed in the range.

SQL
select percentile_cont(0.5) within group (order by greatest(0, (trunc(extract(epoch from cl.changed_at - sc.opened))
      - 86400 * (select count(*) from generate_series(sc.opened::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0)) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
left join lateral (select b.date_created as opened, b.project_process_block_id
    from data_map_1.dm_pb_6_data b
    where b.project_id = e.project_id and b.date_created <= e.date_created and b.date_created >= date '2026-02-15'
    order by b.date_created desc, b.project_process_block_id desc limit 1) pl on true  -- the plan set before it
left join lateral (select s.date_created as opened
    from data_map_1.dm_pb_5_data s
    where s.project_id = e.project_id and s.date_created <= pl.opened and s.date_created >= date '2026-02-15'
    order by s.date_created desc, s.project_process_block_id desc limit 1) sc on true  -- that plan set's scope review
where e.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date
  and sc.opened is not null

Pitfalls:

  • Pairing is by opening date within the project: the latest plan set opened at or before the stamps, and the latest scope review opened at or before that plan set. A stamps block with no plan set or scope review before it has no figure.
  • Every stamps block counts, Restamps included, so a restamp months later carries the original scope review's opening and lands far out. Monthly Review's PremiumCAD figure uses the same clock over PremiumCAD plan sets only (Conflict 12).
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.

As-Builts Created

Engineering Dashboard As-Builts: As-Builts Created tile; the three "from installs…" lines (by IV Relationship); As-Built Scope Reviews table · target none

Also called: As-builts created

Definition: As-built scope reviews whose last real completion falls in the range.

SQL
select count(*) as value
from phoenix.project_process_block ppb
join data_map_1.dm_pb_5_data s on s.project_process_block_id = ppb.id and s.archived = false
join data_map_1.dm_project_data p on p.project_id = s.project_id
join (select a.project_process_block_id, max(a.changed_at)::date as completed
    from (select au.project_process_block_id, au.changed_at, au.object_status_id,
            lag(au.object_status_id) over (partition by au.project_process_block_id order by au.changed_at, au.id) as prev
          from phoenix.project_process_block_audit au
          where au.process_block_id = 5 and au.archived = false) a
    where a.object_status_id = 8 and a.prev is distinct from 8  -- a move into Complete from another status
    group by a.project_process_block_id) c on c.project_process_block_id = ppb.id  -- its last real completion
where ppb.process_block_id = 5
  and ppb.archived = false
  and s.osc_2573 = 1300  -- As-Built Plan Set = Yes
  and c.completed >= date '2026-02-15'
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and c.completed::date between :start_date and :end_date

Pitfalls:

  • Counts scope reviews, not projects, dated by the last real completion (a Complete after another status). A Complete re-stamped on top of a Complete doesn't move it. Volume & SLAs' As-Built rows date the same blocks by the first close instead (Conflict 6).
  • Lumen counts every as-built scope review, primary or not; QuickSight counts only the primary one per project, by its latest Complete row, so the two differ (accepted 2026-11-23).
  • The three lines (not yet verified, verified the same Monday-to-Sunday week, verified earlier) leave out a fourth bucket, IV After Completion, so they can sum below the tile.
  • The Weekly KPI Report's As-Builts Sent Back to Engineering (row 54) counts projects whose as-built fired control 302 in the week instead.

As-Built Rate

Engineering Dashboard As-Builts: As-Built Rate tile; As-Built Rate by Date; By Install Crew, Warehouse, State and AHJ (As-Built Rate) · target none (lower is better)

Also called: As-built rate

Definition: Of the installs verified in the range with an as-built answer, the share that needed an as-built plan set.

SQL
select avg(case when x.required then 1.0 else 0 end) as value,
  sum(case when x.required then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_project_data p
cross join lateral (select
    exists (select 1 from data_map_1.dm_pb_6_data b where b.project_id = p.project_id and b.osc_2574 = 'Yes')
      or exists (select 1 from data_map_1.dm_pb_7_data e where e.project_id = p.project_id and e.osc_2576 = 'Yes') as required,
    exists (select 1 from data_map_1.dm_pb_6_data b where b.project_id = p.project_id and b.osc_2574 is not null)
      or exists (select 1 from data_map_1.dm_pb_7_data e where e.project_id = p.project_id and e.osc_2576 is not null) as has_data) x
where p.osc_671 >= date '2026-02-15'  -- the dataset's date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_671::date between :start_date and :end_date  -- Installation Verified
  and x.has_data  -- a plan set or stamps block answered As-Built Plan Set

Pitfalls:

  • Dated by the project's Installation Verified date (OSC 671); a project counts only when a Plan Set or Engineering Stamps block answers As-Built Plan Set (Yes or No). Projects with no answer drop out of top and bottom.
  • Any plan set or stamps block on the project counts, at any date, including ones from before the install.
  • The Weekly KPI Report's As-Builts as % of Install Verified (row 54a, target ≤ 5%) divides a different count by Residential solar installs (Conflicts 24, 25).
  • The breakdown boards keep only installs with an Install Crew (the crew on the earliest install appointment).

As-Builts Required

Engineering Dashboard As-Builts: "N of N installs verified" line; breakdown boards (As-Builts) · target none

Also called: As-Built Count

Definition: Installs verified in the range that needed an as-built plan set.

SQL
select count(*) as value
from data_map_1.dm_project_data p
cross join lateral (select
    exists (select 1 from data_map_1.dm_pb_6_data b where b.project_id = p.project_id and b.osc_2574 = 'Yes')
      or exists (select 1 from data_map_1.dm_pb_7_data e where e.project_id = p.project_id and e.osc_2576 = 'Yes') as required,
    exists (select 1 from data_map_1.dm_pb_6_data b where b.project_id = p.project_id and b.osc_2574 is not null)
      or exists (select 1 from data_map_1.dm_pb_7_data e where e.project_id = p.project_id and e.osc_2576 is not null) as has_data) x
where p.osc_671 >= date '2026-02-15'  -- the dataset's date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_671::date between :start_date and :end_date  -- Installation Verified
  and x.has_data  -- a plan set or stamps block answered As-Built Plan Set
  and x.required  -- a block's As-Built Plan Set is Yes

Pitfalls:

  • Dated by the project's Installation Verified date (OSC 671); a project counts only when a Plan Set or Engineering Stamps block answers As-Built Plan Set (Yes or No). Projects with no answer drop out of top and bottom.

Installs Verified With As-Built Data

Engineering Dashboard As-Builts: "N of N installs verified" line; breakdown boards (Installs Verified) · target none

Also called: Installs verified; Install Verified Project Count

Definition: Projects verified in the range that have an as-built answer on a plan set or stamps block.

SQL
select count(distinct p.project_id) as value
from data_map_1.dm_project_data p
cross join lateral (select
    exists (select 1 from data_map_1.dm_pb_6_data b where b.project_id = p.project_id and b.osc_2574 = 'Yes')
      or exists (select 1 from data_map_1.dm_pb_7_data e where e.project_id = p.project_id and e.osc_2576 = 'Yes') as required,
    exists (select 1 from data_map_1.dm_pb_6_data b where b.project_id = p.project_id and b.osc_2574 is not null)
      or exists (select 1 from data_map_1.dm_pb_7_data e where e.project_id = p.project_id and e.osc_2576 is not null) as has_data) x
where p.osc_671 >= date '2026-02-15'  -- the dataset's date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_671::date between :start_date and :end_date  -- Installation Verified
  and x.has_data  -- a plan set or stamps block answered As-Built Plan Set

Pitfalls:

  • Not a count of installs verified: projects without an as-built answer drop out, so it runs below Executive's Install Verified.
  • Every project type; archived projects aren't left out.

Resurvey Rate

Engineering Dashboard SLA Delays: Resurvey Rate tile; Resurvey Rate by Closer; Resurvey Rate by Closer Manager · target none

Also called: Resurvey rate

Definition: Of the Fresh scope reviews opened in the range, the share that needed a resurvey.

SQL
select avg(case when s.osc_705 is not null then 1.0 else 0 end) as value,
  sum(case when s.osc_705 is not null then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type = 'Fresh'
  and s.date_created::date between :start_date and :end_date  -- Block Opened Date

Pitfalls:

  • A resurvey is a Resurvey Required Date (OSC 705) on the scope review, whenever it was set.
  • "Fresh" needs the scope review's Plan Set Version to be REV0 and As-Built Plan Set not Yes; a scope review with no version yet isn't counted at all.
  • Counts open scope reviews too; QuickSight's completion-date filter on the closer bars sits in a disabled group, so it doesn't apply.
  • Grows for weeks after the range as resurveys are flagged on recent reviews.

Change Order Rate

Engineering Dashboard SLA Delays: Change Order Rate tile; Change Order Rate by Closer; Change Order Rate by Closer Manager · target none

Also called: Change order rate

Definition: Of the Fresh scope reviews opened in the range, the share that needed a change order.

SQL
select avg(case when s.osc_986 then 1.0 else 0 end) as value,
  sum(case when s.osc_986 then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type = 'Fresh'
  and s.date_created::date between :start_date and :end_date  -- Block Opened Date

Pitfalls:

  • A change order is the scope review's Change Order Required box (OSC 986) checked today; unchecking it removes the job from past ranges.
  • "Fresh" needs the scope review's Plan Set Version to be REV0 and As-Built Plan Set not Yes; a scope review with no version yet isn't counted at all.

Resurveys Required

Engineering Dashboard SLA Delays: "N of N Fresh Scopes Requested" line under Resurvey Rate · target none

Also called: Resurveys required

Definition: Fresh scope reviews opened in the range that needed a resurvey.

SQL
select count(*) as value
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type = 'Fresh'
  and s.date_created::date between :start_date and :end_date  -- Block Opened Date
  and s.osc_705 is not null  -- Resurvey Required Date

Pitfalls:

  • "Fresh" needs the scope review's Plan Set Version to be REV0 and As-Built Plan Set not Yes; a scope review with no version yet isn't counted at all.

Change Orders Required

Engineering Dashboard SLA Delays: "N of N Fresh Scopes Requested" line under Change Order Rate · target none

Also called: Change orders required

Definition: Fresh scope reviews opened in the range that needed a change order.

SQL
select count(*) as value
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type = 'Fresh'
  and s.date_created::date between :start_date and :end_date  -- Block Opened Date
  and s.osc_986  -- Change Order Required

Pitfalls:

  • QuickSight's narration reads "of Fresh Scopes Completed" while it divides by Fresh scopes requested (Conflict 9).

Fresh Scopes Requested

Engineering Dashboard SLA Delays: both "of N Fresh Scopes Requested" lines · target none

Also called: Fresh scopes requested

Definition: Fresh scope reviews opened in the range: the bottom of both rates.

SQL
select count(*) as value
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type = 'Fresh'
  and s.date_created::date between :start_date and :end_date  -- Block Opened Date

Pitfalls:

  • The same blocks as Scope Review Blocks Requested's Fresh row on Volume & SLAs.
  • "Fresh" needs the scope review's Plan Set Version to be REV0 and As-Built Plan Set not Yes; a scope review with no version yet isn't counted at all.

Change Order Rate by Scope Review Completion Month

Engineering Dashboard SLA Delays: Change Order and Resurvey Rates by Date (change order line) · target none

Also called: Change Order Rate - Timeline View

Definition: Of the Fresh scope reviews whose Scope Review Completed date falls in the month, the share that needed a change order.

SQL
select avg(case when s.osc_986 then 1.0 else 0 end) as value,
  sum(case when s.osc_986 then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type = 'Fresh'
  and s.osc_451::date between :start_date and :end_date  -- Scope Review Completed

Pitfalls:

  • Dated by the block's Scope Review Completed field (OSC 451), not its first close in the audit or its opening, so it never matches the tile above it.
  • The resurvey line beside it counts only closed scope reviews and this line counts every one: the two lines on one chart use different populations (Conflict 9).

Resurvey Rate by Scope Review Completion Month

Engineering Dashboard SLA Delays: Change Order and Resurvey Rates by Date (resurvey line) · target none

Also called: Resurvey Rate - Timeline View

Definition: Of the closed Fresh scope reviews whose Scope Review Completed date falls in the month, the share that needed a resurvey.

SQL
select avg(case when s.osc_705 is not null then 1.0 else 0 end) as value,
  sum(case when s.osc_705 is not null then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
      when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
    greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
      - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0) as tat) x
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.work_type = 'Fresh'
  and cl.object_status_id is not null  -- closed (Complete or Canceled)
  and s.osc_451::date between :start_date and :end_date  -- Scope Review Completed

Pitfalls:

  • "Closed" includes a scope review first closed as Canceled.
  • Dated by Scope Review Completed (OSC 451), not the tile's opening date (Conflict 9).

Change Order Reasons Flagged

Engineering Dashboard SLA Delays: Change Orders by Reason; Change Orders by Closer; Change Orders by Closer Manager · target none

Also called: Change orders by reason

Definition: Change order reasons on scope reviews whose change order was flagged in the range, one per reason picked.

SQL
select lv.list_value as reason, count(*) as value
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
join phoenix.list_value lv on lv.id = any(s.osc_1998)  -- each Change Order Reason picked
join (select ce.project_process_block_id, max(ce.date_created)::date as flagged
    from phoenix.project_process_block_component_entry ce
    where ce.object_section_component_id = 986 and ce.boolean_value = true and ce.archived = false
    group by ce.project_process_block_id) co on co.project_process_block_id = s.project_process_block_id  -- the last time Change Order Required was checked
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and s.osc_986  -- Change Order Required
  and co.flagged::date between :start_date and :end_date
group by lv.list_value
order by value desc

Pitfalls:

  • Counts reasons, not jobs: a scope review with three reasons counts three times. Every work type counts, not just Fresh, so the total doesn't match Change Orders Required.
  • Dated by the last time the Change Order Required box was checked on the block, not the scope review's opening like the rate tiles.
  • The by-closer bars join each project's closer; a project with two closer owners would count twice (none in October 2026).

Resurvey Reasons by Scope Review Opened Date

Engineering Dashboard SLA Delays: Resurveys by Reason · target none

Also called: Resurveys by reason

Definition: Resurvey reasons on scope reviews opened in the range, one per reason picked.

SQL
select lv.list_value as reason, count(*) as value
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
join phoenix.list_value lv on lv.id = any(s.osc_2820)  -- each Resurvey Reason picked
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and s.date_created::date between :start_date and :end_date  -- Block Opened Date
group by lv.list_value
order by value desc

Pitfalls:

  • Counts reasons, not jobs, on every work type; a scope review with a reason but no Resurvey Required Date still counts.
  • Dated by the scope review's opening, while the Resurveys by Closer bars beside it date the same reasons by Resurvey Required Date (next entry).

Resurvey Reasons by Resurvey Requested Date

Engineering Dashboard SLA Delays: Resurveys by Closer; Resurveys by Closer Manager · target none

Also called: Resurveys by closer

Definition: Resurvey reasons on scope reviews whose Resurvey Required Date falls in the range, one per reason picked.

SQL
select count(*) as value
from data_map_1.dm_pb_5_data s  -- Scope Review blocks
join data_map_1.dm_project_data p on p.project_id = s.project_id
join phoenix.list_value lv on lv.id = any(s.osc_2820)  -- each Resurvey Reason picked
where s.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and s.osc_705::date between :start_date and :end_date  -- Resurvey Required Date

Pitfalls:

  • Counts reasons, not jobs; split by the project's closer or the closer's primary organization (Closer Manager).
  • A resurvey with no reason picked isn't counted, so the bars can sum below Resurveys Required.

PremiumCAD Plans Created (Fresh)

Engineering Dashboard PremiumCAD: Initial Creation, Fresh row: Plans Created (Spine reading) · target none

Also called: Plans Created

Definition: Fresh plan sets drawn by PremiumCAD with a Plan Set Created date in the range (first submissions).

SQL
select count(*) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type = 'Fresh'
  and b.osc_457 is null  -- no QC Fixes Completed: a first submission

Pitfalls:

  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.
  • One row per plan set block: a block whose QC was failed and fixed counts once, as a QC fix, dated by its Plan Set Created date, and is no longer a first submission. "QC fix" means the block has a QC Fixes Completed date.
  • PremiumCAD's plan sets are those whose Plan Set Created By account name contains "PremiumCAD".

PremiumCAD QC Pass Rate, Initial Creation (Fresh)

Engineering Dashboard PremiumCAD: Initial Creation, Fresh row: QC pass rate (Spine reading) · target 95%

Also called: PremiumCAD Quality Score; QC Quality Pass Flag

Definition: Of PremiumCAD's fresh first submissions with a QC result, the share that passed (Pass, Pass with Feedback or Fix).

SQL
select avg(case when qr.id in (189, 190, 191) then 1.0 when qr.id = 192 then 0 end) as value,
  count(*) filter (where qr.id in (189, 190, 191)) as num, count(*) filter (where qr.id in (189, 190, 191, 192)) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type = 'Fresh'
  and b.osc_457 is null  -- no QC Fixes Completed: a first submission

Pitfalls:

  • Fix counts as a pass and blanks are skipped; Volume & SLAs' QC pass rate counts Pass with Feedback and blanks as fails (Conflict 3).
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.
  • One row per plan set block: a block whose QC was failed and fixed counts once, as a QC fix, dated by its Plan Set Created date, and is no longer a first submission. "QC fix" means the block has a QC Fixes Completed date.

PremiumCAD Creation Time, Initial Creation (Fresh)

Engineering Dashboard PremiumCAD: Initial Creation, Fresh row: Creation Time · target 1 working day

Also called: Creation Time

Definition: Average working days PremiumCAD took on its fresh first submissions: Monday-to-Friday dates from the block's opening to Plan Set Created, less one.

SQL
select avg(greatest(x.wd, 0)) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type = 'Fresh'
  and b.osc_457 is null  -- no QC Fixes Completed: a first submission

Pitfalls:

  • A third way of counting working days: whole Monday-to-Friday dates, both ends counted, less one, never below 0. Volume & SLAs' turnaround is fractional and runs to the QC close (Conflicts 1, 13).
  • On a QC fix the clock still starts at the block's opening, not when QC sent it back.
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.

PremiumCAD Created Within SLA, Initial Creation (Fresh)

Engineering Dashboard PremiumCAD: Initial Creation, Fresh row: Created Within SLA · target 95%

Also called: Created Within SLA

Definition: Share of PremiumCAD's fresh first submissions delivered within 1 working day of the block opening.

SQL
select avg(case when x.wd <= 1 then 1.0 else 0 end) as value,
  sum(case when x.wd <= 1 then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type = 'Fresh'
  and b.osc_457 is null  -- no QC Fixes Completed: a first submission

Pitfalls:

  • Within means Creation Time is 1 or less, so a plan set delivered the next working day is on time. Volume & SLAs' plan set SLA is 1.5 working days to the QC close (Conflict 2).
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.

PremiumCAD Plans Created (Revision)

Engineering Dashboard PremiumCAD: Initial Creation, Revision row: Plans Created (Spine reading) · target none

Also called: Plans Created

Definition: Revision and As-Built plan sets drawn by PremiumCAD with a Plan Set Created date in the range (first submissions).

SQL
select count(*) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type in ('Revision', 'As-Built')
  and b.osc_457 is null  -- no QC Fixes Completed: a first submission

Pitfalls:

  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.
  • One row per plan set block: a block whose QC was failed and fixed counts once, as a QC fix, dated by its Plan Set Created date, and is no longer a first submission. "QC fix" means the block has a QC Fixes Completed date.
  • PremiumCAD's plan sets are those whose Plan Set Created By account name contains "PremiumCAD".
  • Nearly every revision carries a QC Fixes Completed date, so revisions land under QC Fixes, not Initial Creation: 65 of 69 in October 2026.

PremiumCAD QC Pass Rate, Initial Creation (Revision)

Engineering Dashboard PremiumCAD: Initial Creation, Revision row: QC pass rate (Spine reading) · target 98%

Also called: PremiumCAD Quality Score; QC Quality Pass Flag

Definition: Of PremiumCAD's revision and as-built first submissions with a QC result, the share that passed (Pass, Pass with Feedback or Fix).

SQL
select avg(case when qr.id in (189, 190, 191) then 1.0 when qr.id = 192 then 0 end) as value,
  count(*) filter (where qr.id in (189, 190, 191)) as num, count(*) filter (where qr.id in (189, 190, 191, 192)) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type in ('Revision', 'As-Built')
  and b.osc_457 is null  -- no QC Fixes Completed: a first submission

Pitfalls:

  • Fix counts as a pass and blanks are skipped; Volume & SLAs' QC pass rate counts Pass with Feedback and blanks as fails (Conflict 3).
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.
  • One row per plan set block: a block whose QC was failed and fixed counts once, as a QC fix, dated by its Plan Set Created date, and is no longer a first submission. "QC fix" means the block has a QC Fixes Completed date.

PremiumCAD Creation Time, Initial Creation (Revision)

Engineering Dashboard PremiumCAD: Initial Creation, Revision row: Creation Time · target 1 working day

Also called: Creation Time

Definition: Average working days PremiumCAD took on its revision and as-built first submissions: Monday-to-Friday dates from the block's opening to Plan Set Created, less one.

SQL
select avg(greatest(x.wd, 0)) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type in ('Revision', 'As-Built')
  and b.osc_457 is null  -- no QC Fixes Completed: a first submission

Pitfalls:

  • A third way of counting working days: whole Monday-to-Friday dates, both ends counted, less one, never below 0. Volume & SLAs' turnaround is fractional and runs to the QC close (Conflicts 1, 13).
  • On a QC fix the clock still starts at the block's opening, not when QC sent it back.
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.

PremiumCAD Created Within SLA, Initial Creation (Revision)

Engineering Dashboard PremiumCAD: Initial Creation, Revision row: Created Within SLA · target 95%

Also called: Created Within SLA

Definition: Share of PremiumCAD's revision and as-built first submissions delivered within 1 working day of the block opening.

SQL
select avg(case when x.wd <= 1 then 1.0 else 0 end) as value,
  sum(case when x.wd <= 1 then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type in ('Revision', 'As-Built')
  and b.osc_457 is null  -- no QC Fixes Completed: a first submission

Pitfalls:

  • Within means Creation Time is 1 or less, so a plan set delivered the next working day is on time. Volume & SLAs' plan set SLA is 1.5 working days to the QC close (Conflict 2).
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.

PremiumCAD QC Fixes (Fresh)

Engineering Dashboard PremiumCAD: QC Fixes, Fresh row: QC Fixes (Spine reading) · target none

Also called: QC Fixes

Definition: Fresh plan sets drawn by PremiumCAD with a Plan Set Created date in the range (QC fix resubmissions).

SQL
select count(*) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type = 'Fresh'
  and b.osc_457 is not null  -- QC Fixes Completed: a resubmission

Pitfalls:

  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.
  • One row per plan set block: a block whose QC was failed and fixed counts once, as a QC fix, dated by its Plan Set Created date, and is no longer a first submission. "QC fix" means the block has a QC Fixes Completed date.
  • PremiumCAD's plan sets are those whose Plan Set Created By account name contains "PremiumCAD".

PremiumCAD QC Pass Rate, QC Fixes (Fresh)

Engineering Dashboard PremiumCAD: QC Fixes, Fresh row: QC pass rate · target 95%

Also called: PremiumCAD Quality Score; QC Quality Pass Flag

Definition: Of PremiumCAD's fresh QC fix resubmissions with a QC result, the share that passed (Pass, Pass with Feedback or Fix).

SQL
select avg(case when qr.id in (189, 190, 191) then 1.0 when qr.id = 192 then 0 end) as value,
  count(*) filter (where qr.id in (189, 190, 191)) as num, count(*) filter (where qr.id in (189, 190, 191, 192)) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type = 'Fresh'
  and b.osc_457 is not null  -- QC Fixes Completed: a resubmission

Pitfalls:

  • Fix counts as a pass and blanks are skipped; Volume & SLAs' QC pass rate counts Pass with Feedback and blanks as fails (Conflict 3).
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.
  • One row per plan set block: a block whose QC was failed and fixed counts once, as a QC fix, dated by its Plan Set Created date, and is no longer a first submission. "QC fix" means the block has a QC Fixes Completed date.

PremiumCAD Fix Time, QC Fixes (Fresh)

Engineering Dashboard PremiumCAD: QC Fixes, Fresh row: Fix Time · target 1 working day

Also called: Fix Time

Definition: Average working days PremiumCAD took on its fresh QC fix resubmissions: Monday-to-Friday dates from the block's opening to Plan Set Created, less one.

SQL
select avg(greatest(x.wd, 0)) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type = 'Fresh'
  and b.osc_457 is not null  -- QC Fixes Completed: a resubmission

Pitfalls:

  • A third way of counting working days: whole Monday-to-Friday dates, both ends counted, less one, never below 0. Volume & SLAs' turnaround is fractional and runs to the QC close (Conflicts 1, 13).
  • On a QC fix the clock still starts at the block's opening, not when QC sent it back.
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.

PremiumCAD Fixed Within SLA, QC Fixes (Fresh)

Engineering Dashboard PremiumCAD: QC Fixes, Fresh row: Fixed Within SLA · target 95%

Also called: Fixed Within SLA

Definition: Share of PremiumCAD's fresh QC fix resubmissions delivered within 1 working day of the block opening.

SQL
select avg(case when x.wd <= 1 then 1.0 else 0 end) as value,
  sum(case when x.wd <= 1 then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type = 'Fresh'
  and b.osc_457 is not null  -- QC Fixes Completed: a resubmission

Pitfalls:

  • Within means Creation Time is 1 or less, so a plan set delivered the next working day is on time. Volume & SLAs' plan set SLA is 1.5 working days to the QC close (Conflict 2).
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.

PremiumCAD QC Fixes (Revision)

Engineering Dashboard PremiumCAD: QC Fixes, Revision row: QC Fixes (Spine reading) · target none

Also called: QC Fixes

Definition: Revision and As-Built plan sets drawn by PremiumCAD with a Plan Set Created date in the range (QC fix resubmissions).

SQL
select count(*) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type in ('Revision', 'As-Built')
  and b.osc_457 is not null  -- QC Fixes Completed: a resubmission

Pitfalls:

  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.
  • One row per plan set block: a block whose QC was failed and fixed counts once, as a QC fix, dated by its Plan Set Created date, and is no longer a first submission. "QC fix" means the block has a QC Fixes Completed date.
  • PremiumCAD's plan sets are those whose Plan Set Created By account name contains "PremiumCAD".
  • Nearly every revision carries a QC Fixes Completed date, so revisions land under QC Fixes, not Initial Creation: 65 of 69 in October 2026.

PremiumCAD QC Pass Rate, QC Fixes (Revision)

Engineering Dashboard PremiumCAD: QC Fixes, Revision row: QC pass rate · target 98%

Also called: PremiumCAD Quality Score; QC Quality Pass Flag

Definition: Of PremiumCAD's revision and as-built QC fix resubmissions with a QC result, the share that passed (Pass, Pass with Feedback or Fix).

SQL
select avg(case when qr.id in (189, 190, 191) then 1.0 when qr.id = 192 then 0 end) as value,
  count(*) filter (where qr.id in (189, 190, 191)) as num, count(*) filter (where qr.id in (189, 190, 191, 192)) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type in ('Revision', 'As-Built')
  and b.osc_457 is not null  -- QC Fixes Completed: a resubmission

Pitfalls:

  • Fix counts as a pass and blanks are skipped; Volume & SLAs' QC pass rate counts Pass with Feedback and blanks as fails (Conflict 3).
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.
  • One row per plan set block: a block whose QC was failed and fixed counts once, as a QC fix, dated by its Plan Set Created date, and is no longer a first submission. "QC fix" means the block has a QC Fixes Completed date.

PremiumCAD Fix Time, QC Fixes (Revision)

Engineering Dashboard PremiumCAD: QC Fixes, Revision row: Fix Time · target 1 working day

Also called: Fix Time

Definition: Average working days PremiumCAD took on its revision and as-built QC fix resubmissions: Monday-to-Friday dates from the block's opening to Plan Set Created, less one.

SQL
select avg(greatest(x.wd, 0)) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type in ('Revision', 'As-Built')
  and b.osc_457 is not null  -- QC Fixes Completed: a resubmission

Pitfalls:

  • A third way of counting working days: whole Monday-to-Friday dates, both ends counted, less one, never below 0. Volume & SLAs' turnaround is fractional and runs to the QC close (Conflicts 1, 13).
  • On a QC fix the clock still starts at the block's opening, not when QC sent it back.
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.

PremiumCAD Fixed Within SLA, QC Fixes (Revision)

Engineering Dashboard PremiumCAD: QC Fixes, Revision row: Fixed Within SLA · target 95%

Also called: Fixed Within SLA

Definition: Share of PremiumCAD's revision and as-built QC fix resubmissions delivered within 1 working day of the block opening.

SQL
select avg(case when x.wd <= 1 then 1.0 else 0 end) as value,
  sum(case when x.wd <= 1 then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type in ('Revision', 'As-Built')
  and b.osc_457 is not null  -- QC Fixes Completed: a resubmission

Pitfalls:

  • Within means Creation Time is 1 or less, so a plan set delivered the next working day is on time. Volume & SLAs' plan set SLA is 1.5 working days to the QC close (Conflict 2).
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.

PremiumCAD Attempts (Fresh)

Engineering Dashboard PremiumCAD: All Attempts, Fresh row: Attempts · target none

Also called: Attempts

Definition: Fresh plan sets drawn by PremiumCAD with a Plan Set Created date in the range (submissions, first tries and QC fixes together).

SQL
select count(*) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type = 'Fresh'

Pitfalls:

  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.
  • One row per plan set block: a block whose QC was failed and fixed counts once, as a QC fix, dated by its Plan Set Created date, and is no longer a first submission. "QC fix" means the block has a QC Fixes Completed date.
  • PremiumCAD's plan sets are those whose Plan Set Created By account name contains "PremiumCAD".

PremiumCAD QC Pass Rate, All Attempts (Fresh)

Engineering Dashboard PremiumCAD: All Attempts, Fresh row: QC pass rate · target 95%

Also called: PremiumCAD Quality Score; QC Quality Pass Flag

Definition: Of PremiumCAD's fresh submissions, first tries and QC fixes together with a QC result, the share that passed (Pass, Pass with Feedback or Fix).

SQL
select avg(case when qr.id in (189, 190, 191) then 1.0 when qr.id = 192 then 0 end) as value,
  count(*) filter (where qr.id in (189, 190, 191)) as num, count(*) filter (where qr.id in (189, 190, 191, 192)) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type = 'Fresh'

Pitfalls:

  • Fix counts as a pass and blanks are skipped; Volume & SLAs' QC pass rate counts Pass with Feedback and blanks as fails (Conflict 3).
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.
  • One row per plan set block: a block whose QC was failed and fixed counts once, as a QC fix, dated by its Plan Set Created date, and is no longer a first submission. "QC fix" means the block has a QC Fixes Completed date.

PremiumCAD Creation Time, All Attempts (Fresh)

Engineering Dashboard PremiumCAD: All Attempts, Fresh row: Creation Time · target 1 working day

Also called: Creation Time

Definition: Average working days PremiumCAD took on its fresh submissions, first tries and QC fixes together: Monday-to-Friday dates from the block's opening to Plan Set Created, less one.

SQL
select avg(greatest(x.wd, 0)) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type = 'Fresh'

Pitfalls:

  • A third way of counting working days: whole Monday-to-Friday dates, both ends counted, less one, never below 0. Volume & SLAs' turnaround is fractional and runs to the QC close (Conflicts 1, 13).
  • On a QC fix the clock still starts at the block's opening, not when QC sent it back.
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.

PremiumCAD Created Within SLA, All Attempts (Fresh)

Engineering Dashboard PremiumCAD: All Attempts, Fresh row: Created Within SLA · target 95%

Also called: Created Within SLA

Definition: Share of PremiumCAD's fresh submissions, first tries and QC fixes together delivered within 1 working day of the block opening.

SQL
select avg(case when x.wd <= 1 then 1.0 else 0 end) as value,
  sum(case when x.wd <= 1 then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type = 'Fresh'

Pitfalls:

  • Within means Creation Time is 1 or less, so a plan set delivered the next working day is on time. Volume & SLAs' plan set SLA is 1.5 working days to the QC close (Conflict 2).
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.

PremiumCAD Attempts (Revision)

Engineering Dashboard PremiumCAD: All Attempts, Revision row: Attempts · target none

Also called: Attempts

Definition: Revision and As-Built plan sets drawn by PremiumCAD with a Plan Set Created date in the range (submissions, first tries and QC fixes together).

SQL
select count(*) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type in ('Revision', 'As-Built')

Pitfalls:

  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.
  • One row per plan set block: a block whose QC was failed and fixed counts once, as a QC fix, dated by its Plan Set Created date, and is no longer a first submission. "QC fix" means the block has a QC Fixes Completed date.
  • PremiumCAD's plan sets are those whose Plan Set Created By account name contains "PremiumCAD".
  • Nearly every revision carries a QC Fixes Completed date, so revisions land under QC Fixes, not Initial Creation: 65 of 69 in October 2026.

PremiumCAD QC Pass Rate, All Attempts (Revision)

Engineering Dashboard PremiumCAD: All Attempts, Revision row: QC pass rate · target 98%

Also called: PremiumCAD Quality Score; QC Quality Pass Flag

Definition: Of PremiumCAD's revision and as-built submissions, first tries and QC fixes together with a QC result, the share that passed (Pass, Pass with Feedback or Fix).

SQL
select avg(case when qr.id in (189, 190, 191) then 1.0 when qr.id = 192 then 0 end) as value,
  count(*) filter (where qr.id in (189, 190, 191)) as num, count(*) filter (where qr.id in (189, 190, 191, 192)) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type in ('Revision', 'As-Built')

Pitfalls:

  • Fix counts as a pass and blanks are skipped; Volume & SLAs' QC pass rate counts Pass with Feedback and blanks as fails (Conflict 3).
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.
  • One row per plan set block: a block whose QC was failed and fixed counts once, as a QC fix, dated by its Plan Set Created date, and is no longer a first submission. "QC fix" means the block has a QC Fixes Completed date.

PremiumCAD Creation Time, All Attempts (Revision)

Engineering Dashboard PremiumCAD: All Attempts, Revision row: Creation Time · target 1 working day

Also called: Creation Time

Definition: Average working days PremiumCAD took on its revision and as-built submissions, first tries and QC fixes together: Monday-to-Friday dates from the block's opening to Plan Set Created, less one.

SQL
select avg(greatest(x.wd, 0)) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type in ('Revision', 'As-Built')

Pitfalls:

  • A third way of counting working days: whole Monday-to-Friday dates, both ends counted, less one, never below 0. Volume & SLAs' turnaround is fractional and runs to the QC close (Conflicts 1, 13).
  • On a QC fix the clock still starts at the block's opening, not when QC sent it back.
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.

PremiumCAD Created Within SLA, All Attempts (Revision)

Engineering Dashboard PremiumCAD: All Attempts, Revision row: Created Within SLA · target 95%

Also called: Created Within SLA

Definition: Share of PremiumCAD's revision and as-built submissions, first tries and QC fixes together delivered within 1 working day of the block opening.

SQL
select avg(case when x.wd <= 1 then 1.0 else 0 end) as value,
  sum(case when x.wd <= 1 then 1 else 0 end) as num, count(*) as den
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join phoenix.user_position up on up.id = b.osc_454
left join phoenix."user" u on u.id = up.user_id  -- Plan Set Created By
left join phoenix.list_value qr on qr.id = b.osc_472  -- QC Result
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id  -- ever in a revision status
cross join lateral (select
    case when b.osc_2520 is not null then case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision' else 'Fresh' end as work_type,
    (select count(*) from generate_series(b.date_created::date, b.osc_453, interval '1 day') g
      where extract(isodow from g) < 6) - 1 as wd) x  -- working days opened to Plan Set Created, less one
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'  -- drawn by PremiumCAD
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  and x.work_type in ('Revision', 'As-Built')

Pitfalls:

  • Within means Creation Time is 1 or less, so a plan set delivered the next working day is on time. Volume & SLAs' plan set SLA is 1.5 working days to the QC close (Conflict 2).
  • Dated by Plan Set Created on the block (OSC 453), a date with no time, not the block's opening or QC close.

Jobs per Designer per Working Day

Engineering Dashboard Productivity: Throughput tiles: Jobs per designer per day · target none

Also called: Jobs per designer per day

Definition: Engineering blocks closed in the range, per person who closed one, per working day of the range.

SQL
select count(*)::numeric / nullif(count(distinct j.completed_by), 0) / (select count(*) from generate_series(:start_date::date, :end_date::date, interval '1 day') g where extract(isodow from g) < 6) as value
from (select concat(u.first_name, ' ', u.last_name) as completed_by, cl.changed_at as completed, cl.object_status_id as closed_status, x.work_type
  from data_map_1.dm_pb_5_data s  -- Scope Review blocks
  join data_map_1.dm_project_data p on p.project_id = s.project_id
  left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
  cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
        when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
        - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  left join phoenix.user_position up on up.id = s.osc_452  -- Scope Review Completed By
  left join phoenix."user" u on u.id = up.user_id
  where s.date_created >= date '2026-02-15' and coalesce(cast(p.osc_4076 as integer), 0) = 0
  union all
  select concat(u.first_name, ' ', u.last_name), cl.changed_at, cl.object_status_id, x.work_type
  from data_map_1.dm_pb_6_data b  -- Plan Set blocks
  join data_map_1.dm_project_data p on p.project_id = b.project_id
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
  left join (select distinct au.project_process_block_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
  cross join lateral (select case when b.osc_2520 is not null then
          case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
        when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
        else 'Fresh' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
        - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  left join phoenix.user_position up on up.id = b.osc_471  -- QC Completed By
  left join phoenix."user" u on u.id = up.user_id
  where b.date_created >= date '2026-02-15' and coalesce(cast(p.osc_4076 as integer), 0) = 0
  union all
  select concat(u.first_name, ' ', u.last_name), cl.changed_at, cl.object_status_id, x.work_type
  from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
  join data_map_1.dm_project_data p on p.project_id = e.project_id
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
  left join (select distinct au.project_process_block_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
  cross join lateral (select case when e.osc_2575 is not null then
          case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
        when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
        else 'Fresh' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
        - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  left join phoenix.user_position up on up.id = e.osc_487  -- Structural Stamp Provided By
  left join phoenix."user" u on u.id = up.user_id
  where e.date_created >= date '2026-02-15' and coalesce(cast(p.osc_4076 as integer), 0) = 0) j
where j.work_type in ('As-Built', 'Fresh', 'Restamp', 'Revision')
  and j.closed_status in (8, 29, 30)  -- closed Complete, QC Passed or QC Failed
  and trim(j.completed_by) <> '' and j.completed_by not ilike '%premiumcad%'
  and j.completed::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • Working days are the Monday-to-Friday dates in the range, both ends counted, holidays included (a third reckoning, Conflict 13); a range of only weekend days returns nothing.
  • "Completed By" is a different person on each block: the scope review's Scope Review Completed By, the plan set's QC Completed By (the checker, not the drafter), and the stamps' Structural Stamp Provided By. So plan sets credit the QC checker, and a stamp provided by an outside engineer counts under that engineer's account. In October 2026 only 6 people counted, and PremiumCAD accounts provided 113 of the 157 stamps closed Complete, which drop out.
  • Only PremiumCAD's accounts are left out; Lumen dropped QuickSight's table's 50-name list so a new hire shows up.
  • Lumen's own figure: QuickSight's Productivity Data sheet is only the table.

Engineering Jobs Completed

Engineering Dashboard Productivity: Throughput tiles: Jobs completed; Jobs Completed by designer · target none

Also called: Jobs completed

Definition: Scope reviews, plan sets and stamp requests of any work type closed in the range (Complete, QC Passed or QC Failed), by anyone but PremiumCAD.

SQL
select count(*) as value
from (select concat(u.first_name, ' ', u.last_name) as completed_by, cl.changed_at as completed, cl.object_status_id as closed_status, x.work_type
  from data_map_1.dm_pb_5_data s  -- Scope Review blocks
  join data_map_1.dm_project_data p on p.project_id = s.project_id
  left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
  cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
        when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
        - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  left join phoenix.user_position up on up.id = s.osc_452  -- Scope Review Completed By
  left join phoenix."user" u on u.id = up.user_id
  where s.date_created >= date '2026-02-15' and coalesce(cast(p.osc_4076 as integer), 0) = 0
  union all
  select concat(u.first_name, ' ', u.last_name), cl.changed_at, cl.object_status_id, x.work_type
  from data_map_1.dm_pb_6_data b  -- Plan Set blocks
  join data_map_1.dm_project_data p on p.project_id = b.project_id
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
  left join (select distinct au.project_process_block_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
  cross join lateral (select case when b.osc_2520 is not null then
          case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
        when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
        else 'Fresh' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
        - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  left join phoenix.user_position up on up.id = b.osc_471  -- QC Completed By
  left join phoenix."user" u on u.id = up.user_id
  where b.date_created >= date '2026-02-15' and coalesce(cast(p.osc_4076 as integer), 0) = 0
  union all
  select concat(u.first_name, ' ', u.last_name), cl.changed_at, cl.object_status_id, x.work_type
  from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
  join data_map_1.dm_project_data p on p.project_id = e.project_id
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
  left join (select distinct au.project_process_block_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
  cross join lateral (select case when e.osc_2575 is not null then
          case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
        when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
        else 'Fresh' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
        - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  left join phoenix.user_position up on up.id = e.osc_487  -- Structural Stamp Provided By
  left join phoenix."user" u on u.id = up.user_id
  where e.date_created >= date '2026-02-15' and coalesce(cast(p.osc_4076 as integer), 0) = 0) j
where j.work_type in ('As-Built', 'Fresh', 'Restamp', 'Revision')
  and j.closed_status in (8, 29, 30)  -- closed Complete, QC Passed or QC Failed
  and trim(j.completed_by) <> '' and j.completed_by not ilike '%premiumcad%'
  and j.completed::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • "Completed By" is a different person on each block: the scope review's Scope Review Completed By, the plan set's QC Completed By (the checker, not the drafter), and the stamps' Structural Stamp Provided By. So plan sets credit the QC checker, and a stamp provided by an outside engineer counts under that engineer's account. In October 2026 only 6 people counted, and PremiumCAD accounts provided 113 of the 157 stamps closed Complete, which drop out.
  • Only PremiumCAD's accounts are left out; Lumen dropped QuickSight's table's 50-name list so a new hire shows up.

Designers With a Completed Job

Engineering Dashboard Productivity: Throughput tiles: Designers · target none

Also called: Designers

Definition: People who closed at least one engineering block in the range.

SQL
select count(distinct j.completed_by) as value
from (select concat(u.first_name, ' ', u.last_name) as completed_by, cl.changed_at as completed, cl.object_status_id as closed_status, x.work_type
  from data_map_1.dm_pb_5_data s  -- Scope Review blocks
  join data_map_1.dm_project_data p on p.project_id = s.project_id
  left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
  cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
        when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
        - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  left join phoenix.user_position up on up.id = s.osc_452  -- Scope Review Completed By
  left join phoenix."user" u on u.id = up.user_id
  where s.date_created >= date '2026-02-15' and coalesce(cast(p.osc_4076 as integer), 0) = 0
  union all
  select concat(u.first_name, ' ', u.last_name), cl.changed_at, cl.object_status_id, x.work_type
  from data_map_1.dm_pb_6_data b  -- Plan Set blocks
  join data_map_1.dm_project_data p on p.project_id = b.project_id
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
  left join (select distinct au.project_process_block_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
  cross join lateral (select case when b.osc_2520 is not null then
          case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
        when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
        else 'Fresh' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
        - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  left join phoenix.user_position up on up.id = b.osc_471  -- QC Completed By
  left join phoenix."user" u on u.id = up.user_id
  where b.date_created >= date '2026-02-15' and coalesce(cast(p.osc_4076 as integer), 0) = 0
  union all
  select concat(u.first_name, ' ', u.last_name), cl.changed_at, cl.object_status_id, x.work_type
  from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
  join data_map_1.dm_project_data p on p.project_id = e.project_id
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
  left join (select distinct au.project_process_block_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
  cross join lateral (select case when e.osc_2575 is not null then
          case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
        when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
        else 'Fresh' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
        - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  left join phoenix.user_position up on up.id = e.osc_487  -- Structural Stamp Provided By
  left join phoenix."user" u on u.id = up.user_id
  where e.date_created >= date '2026-02-15' and coalesce(cast(p.osc_4076 as integer), 0) = 0) j
where j.work_type in ('As-Built', 'Fresh', 'Restamp', 'Revision')
  and j.closed_status in (8, 29, 30)  -- closed Complete, QC Passed or QC Failed
  and trim(j.completed_by) <> '' and j.completed_by not ilike '%premiumcad%'
  and j.completed::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • "Completed By" is a different person on each block: the scope review's Scope Review Completed By, the plan set's QC Completed By (the checker, not the drafter), and the stamps' Structural Stamp Provided By. So plan sets credit the QC checker, and a stamp provided by an outside engineer counts under that engineer's account. In October 2026 only 6 people counted, and PremiumCAD accounts provided 113 of the 157 stamps closed Complete, which drop out.

Jobs per Working Day

Engineering Dashboard Productivity: Jobs per Working Day by designer · target none

Also called: Jobs per working day

Definition: Engineering blocks closed in the range per working day; the chart shows each person's own.

SQL
select count(*)::numeric / (select count(*) from generate_series(:start_date::date, :end_date::date, interval '1 day') g where extract(isodow from g) < 6) as value
from (select concat(u.first_name, ' ', u.last_name) as completed_by, cl.changed_at as completed, cl.object_status_id as closed_status, x.work_type
  from data_map_1.dm_pb_5_data s  -- Scope Review blocks
  join data_map_1.dm_project_data p on p.project_id = s.project_id
  left join phoenix.list_value ver on ver.id = s.osc_415  -- Plan Set Version
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 5 and au.object_status_id in (8, 9, 6)  -- Complete or Canceled
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = s.project_process_block_id  -- the block's first close
  cross join lateral (select case when ver.list_value is null then null  -- no version yet: no work type
        when s.osc_2573 = 1300 then 'As-Built' when ver.list_value = 'REV0' then 'Fresh' else 'Revision' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - s.date_created))
        - 86400 * (select count(*) from generate_series(s.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  left join phoenix.user_position up on up.id = s.osc_452  -- Scope Review Completed By
  left join phoenix."user" u on u.id = up.user_id
  where s.date_created >= date '2026-02-15' and coalesce(cast(p.osc_4076 as integer), 0) = 0
  union all
  select concat(u.first_name, ' ', u.last_name), cl.changed_at, cl.object_status_id, x.work_type
  from data_map_1.dm_pb_6_data b  -- Plan Set blocks
  join data_map_1.dm_project_data p on p.project_id = b.project_id
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
  left join (select distinct au.project_process_block_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 6 and au.object_status_id in (104, 112, 113)) rv on rv.project_process_block_id = b.project_process_block_id
  cross join lateral (select case when b.osc_2520 is not null then
          case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
        when rv.project_process_block_id is not null then 'Revision'  -- ever in a revision status
        else 'Fresh' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - b.date_created))
        - 86400 * (select count(*) from generate_series(b.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  left join phoenix.user_position up on up.id = b.osc_471  -- QC Completed By
  left join phoenix."user" u on u.id = up.user_id
  where b.date_created >= date '2026-02-15' and coalesce(cast(p.osc_4076 as integer), 0) = 0
  union all
  select concat(u.first_name, ' ', u.last_name), cl.changed_at, cl.object_status_id, x.work_type
  from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
  join data_map_1.dm_project_data p on p.project_id = e.project_id
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
  left join (select distinct au.project_process_block_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 7 and au.object_status_id in (199)) rv on rv.project_process_block_id = e.project_process_block_id
  cross join lateral (select case when e.osc_2575 is not null then
          case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
        when rv.project_process_block_id is not null then 'Restamp'  -- ever in Restamp
        else 'Fresh' end as work_type,
      greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
        - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                   where extract(isodow from g) > 5)) / 86400.0) as tat) x
  left join phoenix.user_position up on up.id = e.osc_487  -- Structural Stamp Provided By
  left join phoenix."user" u on u.id = up.user_id
  where e.date_created >= date '2026-02-15' and coalesce(cast(p.osc_4076 as integer), 0) = 0) j
where j.work_type in ('As-Built', 'Fresh', 'Restamp', 'Revision')
  and j.closed_status in (8, 29, 30)  -- closed Complete, QC Passed or QC Failed
  and trim(j.completed_by) <> '' and j.completed_by not ilike '%premiumcad%'
  and j.completed::date between :start_date and :end_date  -- Block Completed Date

Pitfalls:

  • "Completed By" is a different person on each block: the scope review's Scope Review Completed By, the plan set's QC Completed By (the checker, not the drafter), and the stamps' Structural Stamp Provided By. So plan sets credit the QC checker, and a stamp provided by an outside engineer counts under that engineer's account. In October 2026 only 6 people counted, and PremiumCAD accounts provided 113 of the 157 stamps closed Complete, which drop out.

Supernova Total Saved

Engineering Dashboard Supernova Savings: Savings tiles: Total saved (Spine reading) · target none

Also called: Total saved

Definition: What Supernova's in-house plan sets and first stamps saved in the range against paying PremiumCAD for them.

SQL
select (select sum(case when x.work_type = 'Fresh' then 45 when x.work_type in ('Revision', 'As-Built') then 8 else 0 end)
  from data_map_1.dm_pb_6_data b  -- Plan Set blocks
  join phoenix.project_process_block ppb on ppb.id = b.project_process_block_id and ppb.archived = false
  join data_map_1.dm_project_data p on p.project_id = b.project_id
  left join (select distinct au.project_process_block_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 6 and au.object_status_id in (104, 112, 113) and au.changed_at >= date '2026-10-07') rv on rv.project_process_block_id = b.project_process_block_id
  cross join lateral (select case when b.osc_2520 is not null then
        case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Revision'  -- in a revision status since 2026-10-07
      else 'Fresh' end as work_type) x
  join (select b6.project_id, min(b6.date_created)::date as first_opened
      from data_map_1.dm_pb_6_data b6
      join phoenix.project_process_block x6 on x6.id = b6.project_process_block_id and x6.archived = false
      where b6.date_created >= date '2026-10-07'
      group by b6.project_id) j on j.project_id = p.project_id  -- the job's first in-house plan set
  left join (select distinct po.project_id
      from phoenix.project_owner po
      join phoenix.user_position up on up.id = po.user_position_id
      join phoenix."user" u on u.id = up.user_id
      where po.owner_type_assignment_id in (17, 23) and po.archived = false
        and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%') pv on pv.project_id = p.project_id  -- Third Party Vendor is PremiumCAD
  left join (select distinct e7.project_id
      from data_map_1.dm_pb_7_data e7
      join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
      where e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%') ps on ps.project_id = p.project_id  -- PremiumCAD stamped since 2026-10-07
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and pv.project_id is null  -- no PremiumCAD vendor
    and ps.project_id is null  -- no PremiumCAD stamp
    and b.date_created >= date '2026-10-07'
    and b.osc_453::date between :start_date and :end_date  -- Plan Set Created
  ) + (select sum(case when e.osc_485 is not null and e.osc_751 is not null then 40  -- structural and electrical
      when e.osc_485 is not null then 5  -- structural only
      when e.osc_751 is not null then -10  -- electrical only
      else 0 end)
  from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
  join phoenix.project_process_block ppb on ppb.id = e.project_process_block_id and ppb.archived = false
  join data_map_1.dm_project_data p on p.project_id = e.project_id
  left join (select distinct au.project_process_block_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 7 and au.object_status_id in (199) and au.changed_at >= date '2026-10-07') rv on rv.project_process_block_id = e.project_process_block_id
  cross join lateral (select case when e.osc_2575 is not null then
        case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
      when rv.project_process_block_id is not null then 'Restamp'  -- in Restamp since 2026-10-07
      else 'Fresh' end as work_type) x
  join (select b6.project_id, min(b6.date_created)::date as first_opened
      from data_map_1.dm_pb_6_data b6
      join phoenix.project_process_block x6 on x6.id = b6.project_process_block_id and x6.archived = false
      where b6.date_created >= date '2026-10-07'
      group by b6.project_id) j on j.project_id = p.project_id  -- the job's first in-house plan set
  left join (select distinct po.project_id
      from phoenix.project_owner po
      join phoenix.user_position up on up.id = po.user_position_id
      join phoenix."user" u on u.id = up.user_id
      where po.owner_type_assignment_id in (17, 23) and po.archived = false
        and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%') pv on pv.project_id = p.project_id  -- Third Party Vendor is PremiumCAD
  left join (select distinct e7.project_id
      from data_map_1.dm_pb_7_data e7
      join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
      where e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%') ps on ps.project_id = p.project_id  -- PremiumCAD stamped since 2026-10-07
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and pv.project_id is null  -- no PremiumCAD vendor
    and ps.project_id is null  -- no PremiumCAD stamp
    and e.date_created >= date '2026-10-07'
    and x.work_type = 'Fresh'
    and e.date_created::date between :start_date and :end_date  -- block opened
  ) as value

Pitfalls:

  • Plan sets are dated by Plan Set Created and stamps by the stamps block's opening, so one job's savings can land in two ranges.
  • A Supernova job is a project with a non-archived plan set opened on or after 2026-10-07, no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then. A job PremiumCAD stamps later drops out of every past range.
  • The dollar amounts are constants in Lumen's code (Brendan, 2026-10-22), not PremiumCAD's invoices; they need an owner who keeps them in line with PremiumCAD's prices.

Supernova Saved on Plan Sets

Engineering Dashboard Supernova Savings: Savings tiles: Saved on plan sets · target none

Also called: Saved on plan sets

Definition: $45 for each Fresh plan set and $8 for each Revision or As-Built plan set Supernova created in the range.

SQL
select sum(case when x.work_type = 'Fresh' then 45 when x.work_type in ('Revision', 'As-Built') then 8 else 0 end) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join phoenix.project_process_block ppb on ppb.id = b.project_process_block_id and ppb.archived = false
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113) and au.changed_at >= date '2026-10-07') rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
      case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
    when rv.project_process_block_id is not null then 'Revision'  -- in a revision status since 2026-10-07
    else 'Fresh' end as work_type) x
join (select b6.project_id, min(b6.date_created)::date as first_opened
    from data_map_1.dm_pb_6_data b6
    join phoenix.project_process_block x6 on x6.id = b6.project_process_block_id and x6.archived = false
    where b6.date_created >= date '2026-10-07'
    group by b6.project_id) j on j.project_id = p.project_id  -- the job's first in-house plan set
left join (select distinct po.project_id
    from phoenix.project_owner po
    join phoenix.user_position up on up.id = po.user_position_id
    join phoenix."user" u on u.id = up.user_id
    where po.owner_type_assignment_id in (17, 23) and po.archived = false
      and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%') pv on pv.project_id = p.project_id  -- Third Party Vendor is PremiumCAD
left join (select distinct e7.project_id
    from data_map_1.dm_pb_7_data e7
    join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
    where e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%') ps on ps.project_id = p.project_id  -- PremiumCAD stamped since 2026-10-07
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and pv.project_id is null  -- no PremiumCAD vendor
  and ps.project_id is null  -- no PremiumCAD stamp
  and b.date_created >= date '2026-10-07'
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created

Pitfalls:

  • Counts a plan set once Plan Set Created is filled in, whatever QC later says.
  • A Supernova job is a project with a non-archived plan set opened on or after 2026-10-07, no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then. A job PremiumCAD stamps later drops out of every past range.
  • The dollar amounts are constants in Lumen's code (Brendan, 2026-10-22), not PremiumCAD's invoices; they need an owner who keeps them in line with PremiumCAD's prices.

Supernova Saved on Stamps

Engineering Dashboard Supernova Savings: Savings tiles: Saved on stamps · target none

Also called: Saved on stamps

Definition: On each Fresh stamps block on a Supernova job opened in the range: $40 with both stamps uploaded, $5 structural only, −$10 electrical only.

SQL
select sum(case when e.osc_485 is not null and e.osc_751 is not null then 40  -- structural and electrical
    when e.osc_485 is not null then 5  -- structural only
    when e.osc_751 is not null then -10  -- electrical only
    else 0 end) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join phoenix.project_process_block ppb on ppb.id = e.project_process_block_id and ppb.archived = false
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (199) and au.changed_at >= date '2026-10-07') rv on rv.project_process_block_id = e.project_process_block_id
cross join lateral (select case when e.osc_2575 is not null then
      case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
    when rv.project_process_block_id is not null then 'Restamp'  -- in Restamp since 2026-10-07
    else 'Fresh' end as work_type) x
join (select b6.project_id, min(b6.date_created)::date as first_opened
    from data_map_1.dm_pb_6_data b6
    join phoenix.project_process_block x6 on x6.id = b6.project_process_block_id and x6.archived = false
    where b6.date_created >= date '2026-10-07'
    group by b6.project_id) j on j.project_id = p.project_id  -- the job's first in-house plan set
left join (select distinct po.project_id
    from phoenix.project_owner po
    join phoenix.user_position up on up.id = po.user_position_id
    join phoenix."user" u on u.id = up.user_id
    where po.owner_type_assignment_id in (17, 23) and po.archived = false
      and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%') pv on pv.project_id = p.project_id  -- Third Party Vendor is PremiumCAD
left join (select distinct e7.project_id
    from data_map_1.dm_pb_7_data e7
    join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
    where e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%') ps on ps.project_id = p.project_id  -- PremiumCAD stamped since 2026-10-07
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and pv.project_id is null  -- no PremiumCAD vendor
  and ps.project_id is null  -- no PremiumCAD stamp
  and e.date_created >= date '2026-10-07'
  and x.work_type = 'Fresh'
  and e.date_created::date between :start_date and :end_date  -- block opened

Pitfalls:

  • Dated by the stamps block's opening, so a block opened in the range saves $0 until its stamps are uploaded and the figure grows later.
  • Restamps, revisions and as-builts save $0; electrical-only costs $10 more in-house.
  • A Supernova job is a project with a non-archived plan set opened on or after 2026-10-07, no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then. A job PremiumCAD stamps later drops out of every past range.
  • The dollar amounts are constants in Lumen's code (Brendan, 2026-10-22), not PremiumCAD's invoices; they need an owner who keeps them in line with PremiumCAD's prices.

Supernova Plans Created

Engineering Dashboard Supernova Savings: Volume tiles: Plans created (Spine reading) · target none

Also called: Plans created

Definition: Fresh plan sets on Supernova jobs with a Plan Set Created date in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join phoenix.project_process_block ppb on ppb.id = b.project_process_block_id and ppb.archived = false
join data_map_1.dm_project_data p on p.project_id = b.project_id
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (104, 112, 113) and au.changed_at >= date '2026-10-07') rv on rv.project_process_block_id = b.project_process_block_id
cross join lateral (select case when b.osc_2520 is not null then
      case when b.osc_2574 = 'Yes' then 'As-Built' when b.osc_2520 = 'REV0' then 'Fresh' else 'Revision' end
    when rv.project_process_block_id is not null then 'Revision'  -- in a revision status since 2026-10-07
    else 'Fresh' end as work_type) x
join (select b6.project_id, min(b6.date_created)::date as first_opened
    from data_map_1.dm_pb_6_data b6
    join phoenix.project_process_block x6 on x6.id = b6.project_process_block_id and x6.archived = false
    where b6.date_created >= date '2026-10-07'
    group by b6.project_id) j on j.project_id = p.project_id  -- the job's first in-house plan set
left join (select distinct po.project_id
    from phoenix.project_owner po
    join phoenix.user_position up on up.id = po.user_position_id
    join phoenix."user" u on u.id = up.user_id
    where po.owner_type_assignment_id in (17, 23) and po.archived = false
      and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%') pv on pv.project_id = p.project_id  -- Third Party Vendor is PremiumCAD
left join (select distinct e7.project_id
    from data_map_1.dm_pb_7_data e7
    join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
    where e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%') ps on ps.project_id = p.project_id  -- PremiumCAD stamped since 2026-10-07
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and pv.project_id is null  -- no PremiumCAD vendor
  and ps.project_id is null  -- no PremiumCAD stamp
  and b.date_created >= date '2026-10-07'
  and x.work_type = 'Fresh'
  and b.osc_453::date between :start_date and :end_date  -- Plan Set Created

Pitfalls:

  • Fresh only, by Plan Set Created; Monthly Review's In-House Plan Sets counts every work type by first close, and PremiumCAD's Plans Created counts PremiumCAD's first submissions (Conflict 14).
  • Work Type's revision fallback here reads only revision statuses since 2026-10-07, unlike Engineering 2.0's, which reads the block's whole history.
  • A Supernova job is a project with a non-archived plan set opened on or after 2026-10-07, no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then. A job PremiumCAD stamps later drops out of every past range.

Supernova Sent for Stamps

Engineering Dashboard Supernova Savings: Volume tiles: Sent for stamps · target none

Also called: Sent for stamps

Definition: Fresh Engineering Stamps blocks on Supernova jobs opened in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join phoenix.project_process_block ppb on ppb.id = e.project_process_block_id and ppb.archived = false
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct au.project_process_block_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (199) and au.changed_at >= date '2026-10-07') rv on rv.project_process_block_id = e.project_process_block_id
cross join lateral (select case when e.osc_2575 is not null then
      case when e.osc_2576 = 'Yes' then 'As-Built' when e.osc_2575 = 'REV0' then 'Fresh' else 'Revision' end
    when rv.project_process_block_id is not null then 'Restamp'  -- in Restamp since 2026-10-07
    else 'Fresh' end as work_type) x
join (select b6.project_id, min(b6.date_created)::date as first_opened
    from data_map_1.dm_pb_6_data b6
    join phoenix.project_process_block x6 on x6.id = b6.project_process_block_id and x6.archived = false
    where b6.date_created >= date '2026-10-07'
    group by b6.project_id) j on j.project_id = p.project_id  -- the job's first in-house plan set
left join (select distinct po.project_id
    from phoenix.project_owner po
    join phoenix.user_position up on up.id = po.user_position_id
    join phoenix."user" u on u.id = up.user_id
    where po.owner_type_assignment_id in (17, 23) and po.archived = false
      and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%') pv on pv.project_id = p.project_id  -- Third Party Vendor is PremiumCAD
left join (select distinct e7.project_id
    from data_map_1.dm_pb_7_data e7
    join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
    where e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%') ps on ps.project_id = p.project_id  -- PremiumCAD stamped since 2026-10-07
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and pv.project_id is null  -- no PremiumCAD vendor
  and ps.project_id is null  -- no PremiumCAD stamp
  and e.date_created >= date '2026-10-07'
  and x.work_type = 'Fresh'
  and e.date_created::date between :start_date and :end_date  -- block opened

Pitfalls:

  • Counts stamps blocks opened, not stamps delivered.
  • A Supernova job is a project with a non-archived plan set opened on or after 2026-10-07, no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then. A job PremiumCAD stamps later drops out of every past range.

Supernova Permit Approvals

Engineering Dashboard Supernova Savings: Permits, NEM and M1: Permit approvals (Spine reading) · target none

Also called: Permit approved

Definition: Permits on Supernova jobs approved in the range.

SQL
select count(*) as value
from data_map_1.dm_ev_40_data v  -- Permit Submission events (event 40)
join data_map_1.dm_project_data p on p.project_id = v.project_id
join (select b6.project_id, min(b6.date_created)::date as first_opened
    from data_map_1.dm_pb_6_data b6
    join phoenix.project_process_block x6 on x6.id = b6.project_process_block_id and x6.archived = false
    where b6.date_created >= date '2026-10-07'
    group by b6.project_id) j on j.project_id = p.project_id  -- the job's first in-house plan set
left join (select distinct po.project_id
    from phoenix.project_owner po
    join phoenix.user_position up on up.id = po.user_position_id
    join phoenix."user" u on u.id = up.user_id
    where po.owner_type_assignment_id in (17, 23) and po.archived = false
      and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%') pv on pv.project_id = p.project_id  -- Third Party Vendor is PremiumCAD
left join (select distinct e7.project_id
    from data_map_1.dm_pb_7_data e7
    join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
    where e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%') ps on ps.project_id = p.project_id  -- PremiumCAD stamped since 2026-10-07
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and pv.project_id is null  -- no PremiumCAD vendor
  and ps.project_id is null  -- no PremiumCAD stamp
  and v.osc_1511::date >= j.first_opened  -- on or after the job's first in-house plan set
  and v.osc_1511::date between :start_date and :end_date

Pitfalls:

  • One per event with a approved date, so a permit rejected and later approved counts in both.
  • Only outcomes on or after the job's first in-house plan set count.
  • A Supernova job is a project with a non-archived plan set opened on or after 2026-10-07, no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then. A job PremiumCAD stamps later drops out of every past range.

Supernova Permit Rejections

Engineering Dashboard Supernova Savings: Permits, NEM and M1: Permit rejections · target none

Also called: Permit rejected

Definition: Permits on Supernova jobs rejected in the range.

SQL
select count(*) as value
from data_map_1.dm_ev_40_data v  -- Permit Submission events (event 40)
join data_map_1.dm_project_data p on p.project_id = v.project_id
join (select b6.project_id, min(b6.date_created)::date as first_opened
    from data_map_1.dm_pb_6_data b6
    join phoenix.project_process_block x6 on x6.id = b6.project_process_block_id and x6.archived = false
    where b6.date_created >= date '2026-10-07'
    group by b6.project_id) j on j.project_id = p.project_id  -- the job's first in-house plan set
left join (select distinct po.project_id
    from phoenix.project_owner po
    join phoenix.user_position up on up.id = po.user_position_id
    join phoenix."user" u on u.id = up.user_id
    where po.owner_type_assignment_id in (17, 23) and po.archived = false
      and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%') pv on pv.project_id = p.project_id  -- Third Party Vendor is PremiumCAD
left join (select distinct e7.project_id
    from data_map_1.dm_pb_7_data e7
    join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
    where e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%') ps on ps.project_id = p.project_id  -- PremiumCAD stamped since 2026-10-07
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and pv.project_id is null  -- no PremiumCAD vendor
  and ps.project_id is null  -- no PremiumCAD stamp
  and v.osc_1512::date >= j.first_opened  -- on or after the job's first in-house plan set
  and v.osc_1512::date between :start_date and :end_date

Pitfalls:

  • One per event with a rejected date, so a permit rejected and later approved counts in both.
  • Only outcomes on or after the job's first in-house plan set count.
  • A Supernova job is a project with a non-archived plan set opened on or after 2026-10-07, no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then. A job PremiumCAD stamps later drops out of every past range.

Supernova NEM Approvals

Engineering Dashboard Supernova Savings: Permits, NEM and M1: NEM approvals · target none

Also called: NEM approved

Definition: NEM applications on Supernova jobs approved in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_18_data v  -- NEM Application blocks (PB 18) submitted to the utility
join data_map_1.dm_project_data p on p.project_id = v.project_id
join (select b6.project_id, min(b6.date_created)::date as first_opened
    from data_map_1.dm_pb_6_data b6
    join phoenix.project_process_block x6 on x6.id = b6.project_process_block_id and x6.archived = false
    where b6.date_created >= date '2026-10-07'
    group by b6.project_id) j on j.project_id = p.project_id  -- the job's first in-house plan set
left join (select distinct po.project_id
    from phoenix.project_owner po
    join phoenix.user_position up on up.id = po.user_position_id
    join phoenix."user" u on u.id = up.user_id
    where po.owner_type_assignment_id in (17, 23) and po.archived = false
      and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%') pv on pv.project_id = p.project_id  -- Third Party Vendor is PremiumCAD
left join (select distinct e7.project_id
    from data_map_1.dm_pb_7_data e7
    join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
    where e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%') ps on ps.project_id = p.project_id  -- PremiumCAD stamped since 2026-10-07
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and pv.project_id is null  -- no PremiumCAD vendor
  and ps.project_id is null  -- no PremiumCAD stamp
  and v.osc_1200 is not null  -- Submitted to Utility
  and v.osc_1206::date >= j.first_opened  -- on or after the job's first in-house plan set
  and v.osc_1206::date between :start_date and :end_date

Pitfalls:

  • One per block with a approved date, so a block rejected and later approved counts in both.
  • Only outcomes on or after the job's first in-house plan set count.
  • A Supernova job is a project with a non-archived plan set opened on or after 2026-10-07, no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then. A job PremiumCAD stamps later drops out of every past range.

Supernova NEM Rejections

Engineering Dashboard Supernova Savings: Permits, NEM and M1: NEM rejections · target none

Also called: NEM rejected

Definition: NEM applications on Supernova jobs rejected in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_18_data v  -- NEM Application blocks (PB 18) submitted to the utility
join data_map_1.dm_project_data p on p.project_id = v.project_id
join (select b6.project_id, min(b6.date_created)::date as first_opened
    from data_map_1.dm_pb_6_data b6
    join phoenix.project_process_block x6 on x6.id = b6.project_process_block_id and x6.archived = false
    where b6.date_created >= date '2026-10-07'
    group by b6.project_id) j on j.project_id = p.project_id  -- the job's first in-house plan set
left join (select distinct po.project_id
    from phoenix.project_owner po
    join phoenix.user_position up on up.id = po.user_position_id
    join phoenix."user" u on u.id = up.user_id
    where po.owner_type_assignment_id in (17, 23) and po.archived = false
      and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%') pv on pv.project_id = p.project_id  -- Third Party Vendor is PremiumCAD
left join (select distinct e7.project_id
    from data_map_1.dm_pb_7_data e7
    join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
    where e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%') ps on ps.project_id = p.project_id  -- PremiumCAD stamped since 2026-10-07
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and pv.project_id is null  -- no PremiumCAD vendor
  and ps.project_id is null  -- no PremiumCAD stamp
  and v.osc_1200 is not null  -- Submitted to Utility
  and v.osc_1207::date >= j.first_opened  -- on or after the job's first in-house plan set
  and v.osc_1207::date between :start_date and :end_date

Pitfalls:

  • One per block with a rejected date, so a block rejected and later approved counts in both.
  • Only outcomes on or after the job's first in-house plan set count.
  • A Supernova job is a project with a non-archived plan set opened on or after 2026-10-07, no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then. A job PremiumCAD stamps later drops out of every past range.

Supernova M1 Approvals

Engineering Dashboard Supernova Savings: Permits, NEM and M1: M1 approvals · target none

Also called: M1 approved

Definition: M1 funding submissions on Supernova jobs approved in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data v  -- M1 Funding blocks (PB 26) with a submitted date
join data_map_1.dm_project_data p on p.project_id = v.project_id
join (select b6.project_id, min(b6.date_created)::date as first_opened
    from data_map_1.dm_pb_6_data b6
    join phoenix.project_process_block x6 on x6.id = b6.project_process_block_id and x6.archived = false
    where b6.date_created >= date '2026-10-07'
    group by b6.project_id) j on j.project_id = p.project_id  -- the job's first in-house plan set
left join (select distinct po.project_id
    from phoenix.project_owner po
    join phoenix.user_position up on up.id = po.user_position_id
    join phoenix."user" u on u.id = up.user_id
    where po.owner_type_assignment_id in (17, 23) and po.archived = false
      and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%') pv on pv.project_id = p.project_id  -- Third Party Vendor is PremiumCAD
left join (select distinct e7.project_id
    from data_map_1.dm_pb_7_data e7
    join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
    where e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%') ps on ps.project_id = p.project_id  -- PremiumCAD stamped since 2026-10-07
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and pv.project_id is null  -- no PremiumCAD vendor
  and ps.project_id is null  -- no PremiumCAD stamp
  and v.osc_1160 is not null  -- M1 Submitted
  and v.osc_1161::date >= j.first_opened  -- on or after the job's first in-house plan set
  and v.osc_1161::date between :start_date and :end_date

Pitfalls:

  • One per block with a approved date, so a block rejected and later approved counts in both.
  • Only outcomes on or after the job's first in-house plan set count.
  • A Supernova job is a project with a non-archived plan set opened on or after 2026-10-07, no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then. A job PremiumCAD stamps later drops out of every past range.

Supernova M1 Rejections

Engineering Dashboard Supernova Savings: Permits, NEM and M1: M1 rejections · target none

Also called: M1 rejected

Definition: M1 funding submissions on Supernova jobs rejected in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data v  -- M1 Funding blocks (PB 26) with a submitted date
join data_map_1.dm_project_data p on p.project_id = v.project_id
join (select b6.project_id, min(b6.date_created)::date as first_opened
    from data_map_1.dm_pb_6_data b6
    join phoenix.project_process_block x6 on x6.id = b6.project_process_block_id and x6.archived = false
    where b6.date_created >= date '2026-10-07'
    group by b6.project_id) j on j.project_id = p.project_id  -- the job's first in-house plan set
left join (select distinct po.project_id
    from phoenix.project_owner po
    join phoenix.user_position up on up.id = po.user_position_id
    join phoenix."user" u on u.id = up.user_id
    where po.owner_type_assignment_id in (17, 23) and po.archived = false
      and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%') pv on pv.project_id = p.project_id  -- Third Party Vendor is PremiumCAD
left join (select distinct e7.project_id
    from data_map_1.dm_pb_7_data e7
    join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
    where e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%') ps on ps.project_id = p.project_id  -- PremiumCAD stamped since 2026-10-07
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and pv.project_id is null  -- no PremiumCAD vendor
  and ps.project_id is null  -- no PremiumCAD stamp
  and v.osc_1160 is not null  -- M1 Submitted
  and v.osc_1468::date >= j.first_opened  -- on or after the job's first in-house plan set
  and v.osc_1468::date between :start_date and :end_date

Pitfalls:

  • One per block with a rejected date, so a block rejected and later approved counts in both.
  • Only outcomes on or after the job's first in-house plan set count.
  • A Supernova job is a project with a non-archived plan set opened on or after 2026-10-07, no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then. A job PremiumCAD stamps later drops out of every past range.

NEM Engineering Pass Rate

Engineering Dashboard Rejections: Pass Rate gap chart (NEM row, Engineering pass rate); Engineering Pass Rate by Month (NEM line); Spine reading · target 95%
Engineering Dashboard Rejections (QuickSight): NEM ENG Pass Rate KPI (top row and the NEM section) · target 95%
Monthly Review Summary Slide; Engineering Pass Rate slide (NEM); Goals by Month · target 95%

Also called: NEM - ENG Pass Rate; ENG Pass Rate; Engineering pass rate

Definition: Of the NEM applications decided in the range, the share not rejected for a reason Engineering caused.

SQL
select (count(*) - count(*) filter (where exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1490) and lv.list_value like '%Engineering%')))::numeric / nullif(count(*), 0) as value,
  count(*) - count(*) filter (where exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1490) and lv.list_value like '%Engineering%')) as num, count(*) as den
from data_map_1.dm_pb_18_data r  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1200 is not null  -- Submitted to Utility
  and (r.osc_1206 is not null or r.osc_1207 is not null)  -- NEM Approved or NEM Rejected
  and coalesce(r.osc_1206, r.osc_1207)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.
  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: NEM Approved (OSC 1206), else NEM Rejected (OSC 1207).
  • The Weekly KPI Report's NEM First-Time Pass Rate (row 67a, target 95%) takes each project's first outcome and also reads Previous NEM Rejected Date (OSC 3942); this counts every NEM block decided (Conflict 20).
  • Kalen's Rejection shows NEM's pass rate against the Utilities Team instead (Conflict 7).

NEM Overall Pass Rate

Engineering Dashboard Rejections: Pass Rate gap chart (NEM row, all causes); Engineering Pass Rate by Month (all causes) · target none
Engineering Dashboard Rejections (QuickSight): NEM Overall Pass Rate KPI · target 95%
Engineering Dashboard Kalen's Rejection: Overall row (NEM); NEM block: Overall Pass Rate tile · target 95%

Also called: NEM - Overall Pass Rate; Overall Pass Rate; approval rate; all causes

Definition: Of the NEM applications decided in the range, the share approved, whatever caused the rejections.

SQL
select count(*) filter (where r.osc_1206 is not null)::numeric / nullif(count(*), 0) as value,
  count(*) filter (where r.osc_1206 is not null) as num, count(*) as den
from data_map_1.dm_pb_18_data r  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1200 is not null  -- Submitted to Utility
  and (r.osc_1206 is not null or r.osc_1207 is not null)  -- NEM Approved or NEM Rejected
  and coalesce(r.osc_1206, r.osc_1207)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: NEM Approved (OSC 1206), else NEM Rejected (OSC 1207).
  • The Weekly KPI Report's NEM First-Time Pass Rate (row 67a, target 95%) takes each project's first outcome and also reads Previous NEM Rejected Date (OSC 3942); this counts every NEM block decided (Conflict 20).

NEM Approvals

Engineering Dashboard Kalen's Rejection: NEM block: Approvals tile · target none

Also called: NEM - Approved; Approvals

Definition: NEM applications approved in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_18_data r  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1200 is not null  -- Submitted to Utility
  and (r.osc_1206 is not null or r.osc_1207 is not null)  -- NEM Approved or NEM Rejected
  and coalesce(r.osc_1206, r.osc_1207)::date between :start_date and :end_date  -- Outcome Date
  and r.osc_1206 is not null  -- has an approved date

Pitfalls:

  • Dated by Outcome Date: NEM Approved (OSC 1206), else NEM Rejected (OSC 1207).
  • A block with an approved date counts as an approval even if it also has a rejected date.
  • The Rejections sheet counts NEM Approved dates (0 when none); Kalen's Rejection sums the approved flag (blank when none). Same count otherwise (Conflict 7).

NEM Rejections

Engineering Dashboard Kalen's Rejection: NEM block: Rejections tile; Rejections table · target none

Also called: NEM - Rejected; Rejections

Definition: NEM applications rejected in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_18_data r  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1200 is not null  -- Submitted to Utility
  and (r.osc_1206 is not null or r.osc_1207 is not null)  -- NEM Approved or NEM Rejected
  and coalesce(r.osc_1206, r.osc_1207)::date between :start_date and :end_date  -- Outcome Date
  and r.osc_1207 is not null  -- has a rejected date

Pitfalls:

  • Counts every decided block with a rejected date, dated by Outcome Date (the approved date first), so a block rejected and later approved counts as a rejection where its approval falls, and Approvals plus Rejections can exceed Total Outcomes.

NEM Total Outcomes

Engineering Dashboard Rejections: Pass Rate gap chart (NEM row, outcomes) · target none
Engineering Dashboard Kalen's Rejection: NEM block: Total Outcomes tile · target none

Also called: NEM total outcomes; outcomes

Definition: NEM applications decided in the range, either way.

SQL
select count(o.list_value) as value
from data_map_1.dm_pb_18_data r  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
left join phoenix.list_value o on o.id = r.osc_1205  -- NEM Outcome
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1200 is not null  -- Submitted to Utility
  and (r.osc_1206 is not null or r.osc_1207 is not null)  -- NEM Approved or NEM Rejected
  and coalesce(r.osc_1206, r.osc_1207)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: NEM Approved (OSC 1206), else NEM Rejected (OSC 1207).
  • Counts only blocks whose NEM Outcome field (OSC 1205) is set, so it can fall below Approvals plus Rejections and below the pass rates' denominator; equal in October 2026.

NEM Rejections Attributed to Engineering

Engineering Dashboard Rejections: Pass Rate gap chart (NEM row, by engineering); Engineering Pass Rate by Month (by eng.) · target none

Also called: NEM - ENG Attributable; ENG Attributable; by engineering

Definition: NEM applications decided in the range whose rejection attribution names Engineering.

SQL
select count(*) as value
from data_map_1.dm_pb_18_data r  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1200 is not null  -- Submitted to Utility
  and (r.osc_1206 is not null or r.osc_1207 is not null)  -- NEM Approved or NEM Rejected
  and coalesce(r.osc_1206, r.osc_1207)::date between :start_date and :end_date  -- Outcome Date
  and exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1490) and lv.list_value like '%Engineering%')  -- attributed to Engineering

Pitfalls:

  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.
  • Dated by Outcome Date: NEM Approved (OSC 1206), else NEM Rejected (OSC 1207).
  • Counts the attribution, not the outcome: a block later approved still counts if its attribution names Engineering.

NEM Rejections Attributed to the Utilities Team

Engineering Dashboard Kalen's Rejection: NEM block: Team Attributable tile · target none

Also called: NEM - Team Attributable; Team Attributable

Definition: NEM applications decided in the range whose rejection attribution names the Utilities Team.

SQL
select count(*) as value
from data_map_1.dm_pb_18_data r  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1200 is not null  -- Submitted to Utility
  and (r.osc_1206 is not null or r.osc_1207 is not null)  -- NEM Approved or NEM Rejected
  and coalesce(r.osc_1206, r.osc_1207)::date between :start_date and :end_date  -- Outcome Date
  and exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1490) and lv.list_value like '%Utilities Team%')  -- attributed to Utilities Team

Pitfalls:

  • The same contains-text test as Engineering's, on "Utilities Team" (Conflict 7).
  • Dated by Outcome Date: NEM Approved (OSC 1206), else NEM Rejected (OSC 1207).

NEM Team Pass Rate

Engineering Dashboard Kalen's Rejection: NEM block: Team Pass Rate tile · target 95%

Also called: NEM - Team Pass Rate; Team Pass Rate

Definition: Of the NEM applications decided in the range, the share not rejected for a reason the Utilities Team caused.

SQL
select (count(*) - count(*) filter (where exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1490) and lv.list_value like '%Utilities Team%')))::numeric / nullif(count(*), 0) as value,
  count(*) - count(*) filter (where exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1490) and lv.list_value like '%Utilities Team%')) as num, count(*) as den
from data_map_1.dm_pb_18_data r  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1200 is not null  -- Submitted to Utility
  and (r.osc_1206 is not null or r.osc_1207 is not null)  -- NEM Approved or NEM Rejected
  and coalesce(r.osc_1206, r.osc_1207)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Kalen's Rejection charges NEM rejections to the Utilities Team; the Rejections sheet and Monthly Review charge them to Engineering, under the same target (Conflict 7).
  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: NEM Approved (OSC 1206), else NEM Rejected (OSC 1207).
  • The Weekly KPI Report's NEM First-Time Pass Rate (row 67a, target 95%) takes each project's first outcome and also reads Previous NEM Rejected Date (OSC 3942); this counts every NEM block decided (Conflict 20).

Permitting Engineering Pass Rate

Engineering Dashboard Rejections: Pass Rate gap chart (Permitting row, Engineering pass rate); Engineering Pass Rate by Month (Permitting line); Spine reading · target 95%
Engineering Dashboard Rejections (QuickSight): Permitting ENG Pass Rate KPI (top row and the Permitting section) · target 95%
Monthly Review Summary Slide; Engineering Pass Rate slide (Permitting); Goals by Month · target 95%

Also called: Permitting - ENG Pass Rate; ENG Pass Rate; Engineering pass rate

Definition: Of the permits decided in the range, the share not rejected for a reason Engineering caused.

SQL
select (count(*) - count(*) filter (where og.organization_name like '%Engineering%'))::numeric / nullif(count(*), 0) as value,
  count(*) - count(*) filter (where og.organization_name like '%Engineering%') as num, count(*) as den
from data_map_1.dm_ev_40_data r  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
left join phoenix.organization og on og.id = r.osc_514  -- Permit Rejection Attributable, one organization
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and (r.osc_1511 is not null or r.osc_1512 is not null)  -- Permit Approved or Permit Rejected
  and coalesce(r.osc_1511, r.osc_1512)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.
  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: Permit Approved (OSC 1511), else Permit Rejected (OSC 1512).
  • Permit Rejection Attributable (OSC 514) is a single organization, not a multi-select, so a permit rejection names one team at most.
  • The Weekly KPI Report's Permitting First-Time Pass Rate (row 67b) fails an event with any Permit Rejection Reason, skips canceled events and starts in March 2026; this counts every Permit Submission event with a date (Conflict 21).
  • Kalen's Rejection shows Permitting's pass rate against Permitting instead (Conflict 7).

Permitting Overall Pass Rate

Engineering Dashboard Rejections: Pass Rate gap chart (Permitting row, all causes); Engineering Pass Rate by Month (all causes) · target none
Engineering Dashboard Rejections (QuickSight): Permitting Overall Pass Rate KPI · target 95%
Engineering Dashboard Kalen's Rejection: Overall row (Permitting); Permitting block: Overall Pass Rate tile · target 95% on the Overall row; none on the block's tile
Operations Dashboard Permitting: Permit Pass Rate tile; By Agent board, Pass Rate; rate line on Outcomes by Day · target none

Also called: Permitting - Overall Pass Rate; Overall Pass Rate; approval rate; all causes

Definition: Of the permits decided in the range, the share approved, whatever caused the rejections.

SQL
select count(*) filter (where r.osc_1511 is not null)::numeric / nullif(count(*), 0) as value,
  count(*) filter (where r.osc_1511 is not null) as num, count(*) as den
from data_map_1.dm_ev_40_data r  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
left join phoenix.organization og on og.id = r.osc_514  -- Permit Rejection Attributable, one organization
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and (r.osc_1511 is not null or r.osc_1512 is not null)  -- Permit Approved or Permit Rejected
  and coalesce(r.osc_1511, r.osc_1512)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: Permit Approved (OSC 1511), else Permit Rejected (OSC 1512).
  • Permit Rejection Attributable (OSC 514) is a single organization, not a multi-select, so a permit rejection names one team at most.
  • The Weekly KPI Report's Permitting First-Time Pass Rate (row 67b) fails an event with any Permit Rejection Reason, skips canceled events and starts in March 2026; this counts every Permit Submission event with a date (Conflict 21).

Permitting Approvals

Engineering Dashboard Kalen's Rejection: Permitting block: Approvals tile · target none
Operations Dashboard Permitting: Permits Approved tile; By Agent board, Approved; Outcomes by Day (Approved) · target none

Also called: Permitting - Approved; Approvals

Definition: Permits approved in the range.

SQL
select count(*) as value
from data_map_1.dm_ev_40_data r  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
left join phoenix.organization og on og.id = r.osc_514  -- Permit Rejection Attributable, one organization
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and (r.osc_1511 is not null or r.osc_1512 is not null)  -- Permit Approved or Permit Rejected
  and coalesce(r.osc_1511, r.osc_1512)::date between :start_date and :end_date  -- Outcome Date
  and r.osc_1511 is not null  -- has an approved date

Pitfalls:

  • Dated by Outcome Date: Permit Approved (OSC 1511), else Permit Rejected (OSC 1512).
  • A block with an approved date counts as an approval even if it also has a rejected date.

Permitting Rejections

Engineering Dashboard Kalen's Rejection: Permitting block: Rejections tile; Rejections table · target none

Also called: Permitting - Rejected; Rejections

Definition: Permits rejected in the range.

SQL
select count(*) as value
from data_map_1.dm_ev_40_data r  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
left join phoenix.organization og on og.id = r.osc_514  -- Permit Rejection Attributable, one organization
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and (r.osc_1511 is not null or r.osc_1512 is not null)  -- Permit Approved or Permit Rejected
  and coalesce(r.osc_1511, r.osc_1512)::date between :start_date and :end_date  -- Outcome Date
  and r.osc_1512 is not null  -- has a rejected date

Pitfalls:

  • Counts every decided block with a rejected date, dated by Outcome Date (the approved date first), so a block rejected and later approved counts as a rejection where its approval falls, and Approvals plus Rejections can exceed Total Outcomes.

Permitting Total Outcomes

Engineering Dashboard Rejections: Pass Rate gap chart (Permitting row, outcomes) · target none
Engineering Dashboard Kalen's Rejection: Permitting block: Total Outcomes tile · target none
Ops Leaderboards Permitting board: This Week to Date, Last Week, Month to Date and Selected Range columns · target none

Also called: Permitting total outcomes; outcomes

Definition: Permits decided in the range, either way.

SQL
select count(*) as value
from data_map_1.dm_ev_40_data r  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
left join phoenix.organization og on og.id = r.osc_514  -- Permit Rejection Attributable, one organization
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and (r.osc_1511 is not null or r.osc_1512 is not null)  -- Permit Approved or Permit Rejected
  and coalesce(r.osc_1511, r.osc_1512)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: Permit Approved (OSC 1511), else Permit Rejected (OSC 1512).

Permitting Rejections Attributed to Engineering

Engineering Dashboard Rejections: Pass Rate gap chart (Permitting row, by engineering); Engineering Pass Rate by Month (by eng.) · target none

Also called: Permitting - ENG Attributable; ENG Attributable; by engineering

Definition: Permits decided in the range whose rejection attribution names Engineering.

SQL
select count(*) as value
from data_map_1.dm_ev_40_data r  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
left join phoenix.organization og on og.id = r.osc_514  -- Permit Rejection Attributable, one organization
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and (r.osc_1511 is not null or r.osc_1512 is not null)  -- Permit Approved or Permit Rejected
  and coalesce(r.osc_1511, r.osc_1512)::date between :start_date and :end_date  -- Outcome Date
  and og.organization_name like '%Engineering%'  -- attributed to Engineering

Pitfalls:

  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.
  • Dated by Outcome Date: Permit Approved (OSC 1511), else Permit Rejected (OSC 1512).
  • Counts the attribution, not the outcome: a block later approved still counts if its attribution names Engineering.

Permitting Rejections Attributed to the Permitting Team

Engineering Dashboard Kalen's Rejection: Permitting block: Team Attributable tile · target none

Also called: Permitting - Team Attributable; Team Attributable

Definition: Permits decided in the range whose rejection attribution names Permitting.

SQL
select count(*) as value
from data_map_1.dm_ev_40_data r  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
left join phoenix.organization og on og.id = r.osc_514  -- Permit Rejection Attributable, one organization
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and (r.osc_1511 is not null or r.osc_1512 is not null)  -- Permit Approved or Permit Rejected
  and coalesce(r.osc_1511, r.osc_1512)::date between :start_date and :end_date  -- Outcome Date
  and og.organization_name like '%Permitting%'  -- attributed to Permitting

Pitfalls:

  • The same contains-text test as Engineering's, on "Permitting" (Conflict 7).
  • Dated by Outcome Date: Permit Approved (OSC 1511), else Permit Rejected (OSC 1512).
  • Permit Rejection Attributable (OSC 514) is a single organization, not a multi-select, so a permit rejection names one team at most.

Permitting Team Pass Rate

Engineering Dashboard Kalen's Rejection: Permitting block: Team Pass Rate tile · target 95%

Also called: Permitting - Team Pass Rate; Team Pass Rate

Definition: Of the permits decided in the range, the share not rejected for a reason Permitting caused.

SQL
select (count(*) - count(*) filter (where og.organization_name like '%Permitting%'))::numeric / nullif(count(*), 0) as value,
  count(*) - count(*) filter (where og.organization_name like '%Permitting%') as num, count(*) as den
from data_map_1.dm_ev_40_data r  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
left join phoenix.organization og on og.id = r.osc_514  -- Permit Rejection Attributable, one organization
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and (r.osc_1511 is not null or r.osc_1512 is not null)  -- Permit Approved or Permit Rejected
  and coalesce(r.osc_1511, r.osc_1512)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Kalen's Rejection charges Permitting rejections to Permitting; the Rejections sheet and Monthly Review charge them to Engineering, under the same target (Conflict 7).
  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: Permit Approved (OSC 1511), else Permit Rejected (OSC 1512).
  • The Weekly KPI Report's Permitting First-Time Pass Rate (row 67b) fails an event with any Permit Rejection Reason, skips canceled events and starts in March 2026; this counts every Permit Submission event with a date (Conflict 21).

Inspection Engineering Pass Rate

Engineering Dashboard Rejections: Pass Rate gap chart (Inspections row, Engineering pass rate); Engineering Pass Rate by Month (Inspections line); Spine reading · target 98%
Engineering Dashboard Rejections (QuickSight): Inspections ENG Pass Rate KPI (top row and the Inspections section) · target 98%
Engineering Dashboard Kalen's Rejection: Inspections block: ENG Pass Rate tile · target 98%
Monthly Review Summary Slide; Engineering Pass Rate slide (Inspections); Goals by Month · target 98%

Also called: Inspections - ENG Pass Rate; ENG Pass Rate; Engineering pass rate

Definition: Of the inspections decided in the range, the share not failed for a reason Engineering caused.

SQL
select (count(*) - count(*) filter (where exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_2349) and lv.list_value like '%Engineering%')))::numeric / nullif(count(*), 0) as value,
  count(*) - count(*) filter (where exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_2349) and lv.list_value like '%Engineering%')) as num, count(*) as den
from data_map_1.dm_ev_42_data r  -- Final Inspection events (event 42)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
cross join lateral (select exists (select 1 from phoenix.list_value o
      where o.id in (r.osc_1070, r.osc_1071, r.osc_1072, r.osc_1073, r.osc_1074, r.osc_1075)
        and o.list_value = 'Failed') as failed) f  -- any of the six outcomes Failed
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.start_time is not null  -- has an inspection date
  and r.start_time::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.
  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: the inspection event's start time.
  • An inspection is Failed when any of its six outcome fields (building, electrical, fire, solar, trench, specialty) is Failed, and Passed otherwise, so an inspection event with no outcome recorded counts as Passed: 36 of October 2026's 299 passes had no outcome entered. It is dated by the event's start time, the appointment, not when the result was entered.
  • The Weekly KPI Report's First-Time Inspection Pass Rate (target 85%) counts each project's first passed-or-failed inspection, by project; this counts every inspection event (Conflict 19).

Inspection Overall Pass Rate

Engineering Dashboard Rejections: Pass Rate gap chart (Inspections row, all causes); Engineering Pass Rate by Month (all causes) · target none
Engineering Dashboard Rejections (QuickSight): Inspections Overall Pass Rate KPI · target 98%
Engineering Dashboard Kalen's Rejection: Overall row (Inspections); Inspections block: Overall Pass Rate tile · target 98%

Also called: Inspections - Overall Pass Rate; Overall Pass Rate; approval rate; all causes

Definition: Of the inspections decided in the range, the share passed, whatever caused the failures.

SQL
select count(*) filter (where not f.failed)::numeric / nullif(count(*), 0) as value,
  count(*) filter (where not f.failed) as num, count(*) as den
from data_map_1.dm_ev_42_data r  -- Final Inspection events (event 42)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
cross join lateral (select exists (select 1 from phoenix.list_value o
      where o.id in (r.osc_1070, r.osc_1071, r.osc_1072, r.osc_1073, r.osc_1074, r.osc_1075)
        and o.list_value = 'Failed') as failed) f  -- any of the six outcomes Failed
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.start_time is not null  -- has an inspection date
  and r.start_time::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: the inspection event's start time.
  • An inspection is Failed when any of its six outcome fields (building, electrical, fire, solar, trench, specialty) is Failed, and Passed otherwise, so an inspection event with no outcome recorded counts as Passed: 36 of October 2026's 299 passes had no outcome entered. It is dated by the event's start time, the appointment, not when the result was entered.
  • The Weekly KPI Report's First-Time Inspection Pass Rate (target 85%) counts each project's first passed-or-failed inspection, by project; this counts every inspection event (Conflict 19).

Inspections Passed

Engineering Dashboard Kalen's Rejection: Inspections block: Approvals tile · target none

Also called: Inspections - Approved; Approvals

Definition: Inspections passed in the range.

SQL
select count(*) as value
from data_map_1.dm_ev_42_data r  -- Final Inspection events (event 42)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
cross join lateral (select exists (select 1 from phoenix.list_value o
      where o.id in (r.osc_1070, r.osc_1071, r.osc_1072, r.osc_1073, r.osc_1074, r.osc_1075)
        and o.list_value = 'Failed') as failed) f  -- any of the six outcomes Failed
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.start_time is not null  -- has an inspection date
  and r.start_time::date between :start_date and :end_date  -- Outcome Date
  and not f.failed  -- Passed

Pitfalls:

  • Dated by Outcome Date: the inspection event's start time.
  • An inspection is Failed when any of its six outcome fields (building, electrical, fire, solar, trench, specialty) is Failed, and Passed otherwise, so an inspection event with no outcome recorded counts as Passed: 36 of October 2026's 299 passes had no outcome entered. It is dated by the event's start time, the appointment, not when the result was entered.
  • The Weekly KPI Report counts approvals once per project on the project milestone date, cash deals included; this counts blocks or events (Conflict 18).

Inspection Failures

Engineering Dashboard Kalen's Rejection: Inspections block: Failures tile; Failures table · target none

Also called: Inspections - Rejected; Failures

Definition: Inspections failed in the range.

SQL
select count(*) as value
from data_map_1.dm_ev_42_data r  -- Final Inspection events (event 42)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
cross join lateral (select exists (select 1 from phoenix.list_value o
      where o.id in (r.osc_1070, r.osc_1071, r.osc_1072, r.osc_1073, r.osc_1074, r.osc_1075)
        and o.list_value = 'Failed') as failed) f  -- any of the six outcomes Failed
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.start_time is not null  -- has an inspection date
  and r.start_time::date between :start_date and :end_date  -- Outcome Date
  and f.failed  -- Failed

Pitfalls:

  • An inspection is Failed when any of its six outcome fields (building, electrical, fire, solar, trench, specialty) is Failed, and Passed otherwise, so an inspection event with no outcome recorded counts as Passed: 36 of October 2026's 299 passes had no outcome entered. It is dated by the event's start time, the appointment, not when the result was entered.

Inspection Total Outcomes

Engineering Dashboard Rejections: Pass Rate gap chart (Inspections row, outcomes) · target none
Engineering Dashboard Kalen's Rejection: Inspections block: Total Outcomes tile · target none

Also called: Inspections total outcomes; outcomes

Definition: Inspections decided in the range, either way.

SQL
select count(*) as value
from data_map_1.dm_ev_42_data r  -- Final Inspection events (event 42)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
cross join lateral (select exists (select 1 from phoenix.list_value o
      where o.id in (r.osc_1070, r.osc_1071, r.osc_1072, r.osc_1073, r.osc_1074, r.osc_1075)
        and o.list_value = 'Failed') as failed) f  -- any of the six outcomes Failed
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.start_time is not null  -- has an inspection date
  and r.start_time::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: the inspection event's start time.

Inspection Failures Attributed to Engineering

Engineering Dashboard Rejections: Pass Rate gap chart (Inspections row, by engineering); Engineering Pass Rate by Month (by eng.) · target none
Engineering Dashboard Kalen's Rejection: Inspections block: ENG Attributable tile · target none

Also called: Inspections - ENG Attributable; ENG Attributable; by engineering

Definition: Inspections decided in the range whose failure attribution names Engineering.

SQL
select count(*) as value
from data_map_1.dm_ev_42_data r  -- Final Inspection events (event 42)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
cross join lateral (select exists (select 1 from phoenix.list_value o
      where o.id in (r.osc_1070, r.osc_1071, r.osc_1072, r.osc_1073, r.osc_1074, r.osc_1075)
        and o.list_value = 'Failed') as failed) f  -- any of the six outcomes Failed
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.start_time is not null  -- has an inspection date
  and r.start_time::date between :start_date and :end_date  -- Outcome Date
  and exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_2349) and lv.list_value like '%Engineering%')  -- attributed to Engineering

Pitfalls:

  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.
  • Dated by Outcome Date: the inspection event's start time.
  • Counts the attribution, not the outcome: a block later approved still counts if its attribution names Engineering.

PTO Engineering Pass Rate

Engineering Dashboard Rejections: Pass Rate gap chart (PTO row, Engineering pass rate); Engineering Pass Rate by Month (PTO line); Spine reading · target 98%
Engineering Dashboard Rejections (QuickSight): PTO ENG Pass Rate KPI (top row and the PTO section) · target 98%
Engineering Dashboard Kalen's Rejection: PTO block: ENG Pass Rate tile · target 98%
Monthly Review Summary Slide; Engineering Pass Rate slide (PTO); Goals by Month · target 98%

Also called: PTO - ENG Pass Rate; ENG Pass Rate; Engineering pass rate

Definition: Of the PTO requests decided in the range, the share not rejected for a reason Engineering caused.

SQL
select (count(*) - count(*) filter (where exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1491) and lv.list_value like '%Engineering%')))::numeric / nullif(count(*), 0) as value,
  count(*) - count(*) filter (where exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1491) and lv.list_value like '%Engineering%')) as num, count(*) as den
from data_map_1.dm_pb_28_data r  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1223 is not null  -- PTO Submitted
  and (r.osc_1226 is not null or r.osc_1227 is not null)  -- PTO Approved or PTO Rejected
  and coalesce(r.osc_1226, r.osc_1227)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.
  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: PTO Approved (OSC 1226), else PTO Rejected (OSC 1227).
  • The Weekly KPI Report's PTO First-Pass Approval % (row 74, target 97%) counts first submissions by project PTO Submitted (OSC 675); this counts every PTO block decided (Conflict 22).

PTO Overall Pass Rate

Engineering Dashboard Rejections: Pass Rate gap chart (PTO row, all causes); Engineering Pass Rate by Month (all causes) · target none
Engineering Dashboard Rejections (QuickSight): PTO Overall Pass Rate KPI · target 98%
Engineering Dashboard Kalen's Rejection: Overall row (PTO); PTO block: Overall Pass Rate tile · target 98%

Also called: PTO - Overall Pass Rate; Overall Pass Rate; approval rate; all causes

Definition: Of the PTO requests decided in the range, the share approved, whatever caused the rejections.

SQL
select count(*) filter (where r.osc_1226 is not null)::numeric / nullif(count(*), 0) as value,
  count(*) filter (where r.osc_1226 is not null) as num, count(*) as den
from data_map_1.dm_pb_28_data r  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1223 is not null  -- PTO Submitted
  and (r.osc_1226 is not null or r.osc_1227 is not null)  -- PTO Approved or PTO Rejected
  and coalesce(r.osc_1226, r.osc_1227)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: PTO Approved (OSC 1226), else PTO Rejected (OSC 1227).
  • The Weekly KPI Report's PTO First-Pass Approval % (row 74, target 97%) counts first submissions by project PTO Submitted (OSC 675); this counts every PTO block decided (Conflict 22).

PTO Approvals

Engineering Dashboard Kalen's Rejection: PTO block: Approvals tile · target none

Also called: PTO - Approved; Approvals

Definition: PTO requests approved in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_28_data r  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1223 is not null  -- PTO Submitted
  and (r.osc_1226 is not null or r.osc_1227 is not null)  -- PTO Approved or PTO Rejected
  and coalesce(r.osc_1226, r.osc_1227)::date between :start_date and :end_date  -- Outcome Date
  and r.osc_1226 is not null  -- has an approved date

Pitfalls:

  • Dated by Outcome Date: PTO Approved (OSC 1226), else PTO Rejected (OSC 1227).
  • A block with an approved date counts as an approval even if it also has a rejected date.
  • The Weekly KPI Report counts approvals once per project on the project milestone date, cash deals included; this counts blocks or events (Conflict 18).

PTO Rejections

Engineering Dashboard Kalen's Rejection: PTO block: Rejections tile; Rejections table · target none

Also called: PTO - Rejected; Rejections

Definition: PTO requests rejected in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_28_data r  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1223 is not null  -- PTO Submitted
  and (r.osc_1226 is not null or r.osc_1227 is not null)  -- PTO Approved or PTO Rejected
  and coalesce(r.osc_1226, r.osc_1227)::date between :start_date and :end_date  -- Outcome Date
  and r.osc_1227 is not null  -- has a rejected date

Pitfalls:

  • Counts every decided block with a rejected date, dated by Outcome Date (the approved date first), so a block rejected and later approved counts as a rejection where its approval falls, and Approvals plus Rejections can exceed Total Outcomes.

PTO Total Outcomes

Engineering Dashboard Rejections: Pass Rate gap chart (PTO row, outcomes) · target none
Engineering Dashboard Kalen's Rejection: PTO block: Total Outcomes tile · target none

Also called: PTO total outcomes; outcomes

Definition: PTO requests decided in the range, either way.

SQL
select count(*) as value
from data_map_1.dm_pb_28_data r  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1223 is not null  -- PTO Submitted
  and (r.osc_1226 is not null or r.osc_1227 is not null)  -- PTO Approved or PTO Rejected
  and coalesce(r.osc_1226, r.osc_1227)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: PTO Approved (OSC 1226), else PTO Rejected (OSC 1227).

PTO Rejections Attributed to Engineering

Engineering Dashboard Rejections: Pass Rate gap chart (PTO row, by engineering); Engineering Pass Rate by Month (by eng.) · target none
Engineering Dashboard Kalen's Rejection: PTO block: ENG Attributable tile · target none

Also called: PTO - ENG Attributable; ENG Attributable; by engineering

Definition: PTO requests decided in the range whose rejection attribution names Engineering.

SQL
select count(*) as value
from data_map_1.dm_pb_28_data r  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1223 is not null  -- PTO Submitted
  and (r.osc_1226 is not null or r.osc_1227 is not null)  -- PTO Approved or PTO Rejected
  and coalesce(r.osc_1226, r.osc_1227)::date between :start_date and :end_date  -- Outcome Date
  and exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1491) and lv.list_value like '%Engineering%')  -- attributed to Engineering

Pitfalls:

  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.
  • Dated by Outcome Date: PTO Approved (OSC 1226), else PTO Rejected (OSC 1227).
  • Counts the attribution, not the outcome: a block later approved still counts if its attribution names Engineering.
  • Blank, not 0, when none: October 2026 had none for PTO.

M1 Funding Engineering Pass Rate

Engineering Dashboard Rejections: Pass Rate gap chart (M1 Funding row, Engineering pass rate); Engineering Pass Rate by Month (M1 Funding line); Spine reading · target 98%
Engineering Dashboard Rejections (QuickSight): M1 Funding ENG Pass Rate KPI (top row and the M1 Funding section) · target 98%
Engineering Dashboard Kalen's Rejection: M1 Funding block: ENG Pass Rate tile · target 98%
Monthly Review Summary Slide; Engineering Pass Rate slide (M1 Funding); Goals by Month · target 98%

Also called: M1 Funding - ENG Pass Rate; ENG Pass Rate; Engineering pass rate

Definition: Of the M1 funding submissions decided in the range, the share not rejected for a reason Engineering caused.

SQL
select (count(*) - count(*) filter (where exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1469) and lv.list_value like '%Engineering%')))::numeric / nullif(count(*), 0) as value,
  count(*) - count(*) filter (where exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1469) and lv.list_value like '%Engineering%')) as num, count(*) as den
from data_map_1.dm_pb_26_data r  -- M1 Funding blocks (PB 26)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1160 is not null  -- M1 Submitted
  and (r.osc_1161 is not null or r.osc_1468 is not null)  -- M1 Approved or M1 Rejected
  and coalesce(r.osc_1161, r.osc_1468)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.
  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: M1 Approved (OSC 1161), else M1 Rejected (OSC 1468).
  • Lumen's stored M1 and M2 rows overcounted October 2026 until Load History reloads them (the spec's own note); Phoenix and QuickSight agree.
  • Counts every M1 rejection, the funding team's and the financier's. The Funding Dashboard's M1 Financier Pass Rate counts only Funding Rejected By = Financier, and dates M1 by the rejected date first; the Weekly KPI Report's M1 First-Pass Approval % counts only Funding Team rejections on project milestone dates (Conflicts 8, 15).

M1 Funding Overall Pass Rate

Engineering Dashboard Rejections: Pass Rate gap chart (M1 Funding row, all causes); Engineering Pass Rate by Month (all causes) · target none
Engineering Dashboard Rejections (QuickSight): M1 Funding Overall Pass Rate KPI · target 98%
Engineering Dashboard Kalen's Rejection: Overall row (M1 Funding); M1 Funding block: Overall Pass Rate tile · target 98%

Also called: M1 Funding - Overall Pass Rate; Overall Pass Rate; approval rate; all causes

Definition: Of the M1 funding submissions decided in the range, the share approved, whatever caused the rejections.

SQL
select count(*) filter (where r.osc_1161 is not null)::numeric / nullif(count(*), 0) as value,
  count(*) filter (where r.osc_1161 is not null) as num, count(*) as den
from data_map_1.dm_pb_26_data r  -- M1 Funding blocks (PB 26)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1160 is not null  -- M1 Submitted
  and (r.osc_1161 is not null or r.osc_1468 is not null)  -- M1 Approved or M1 Rejected
  and coalesce(r.osc_1161, r.osc_1468)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: M1 Approved (OSC 1161), else M1 Rejected (OSC 1468).
  • Lumen's stored M1 and M2 rows overcounted October 2026 until Load History reloads them (the spec's own note); Phoenix and QuickSight agree.
  • Counts every M1 rejection, the funding team's and the financier's. The Funding Dashboard's M1 Financier Pass Rate counts only Funding Rejected By = Financier, and dates M1 by the rejected date first; the Weekly KPI Report's M1 First-Pass Approval % counts only Funding Team rejections on project milestone dates (Conflicts 8, 15).

M1 Funding Approvals

Engineering Dashboard Kalen's Rejection: M1 Funding block: Approvals tile · target none

Also called: M1 Funding - Approved; Approvals

Definition: M1 funding submissions approved in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data r  -- M1 Funding blocks (PB 26)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1160 is not null  -- M1 Submitted
  and (r.osc_1161 is not null or r.osc_1468 is not null)  -- M1 Approved or M1 Rejected
  and coalesce(r.osc_1161, r.osc_1468)::date between :start_date and :end_date  -- Outcome Date
  and r.osc_1161 is not null  -- has an approved date

Pitfalls:

  • Dated by Outcome Date: M1 Approved (OSC 1161), else M1 Rejected (OSC 1468).
  • A block with an approved date counts as an approval even if it also has a rejected date.
  • Lumen's stored M1 and M2 rows overcounted October 2026 until Load History reloads them (the spec's own note); Phoenix and QuickSight agree.
  • The Weekly KPI Report counts approvals once per project on the project milestone date, cash deals included; this counts blocks or events (Conflict 18).

M1 Funding Rejections

Engineering Dashboard Kalen's Rejection: M1 Funding block: Rejections tile; Rejections table · target none

Also called: M1 Funding - Rejected; Rejections

Definition: M1 funding submissions rejected in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data r  -- M1 Funding blocks (PB 26)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1160 is not null  -- M1 Submitted
  and (r.osc_1161 is not null or r.osc_1468 is not null)  -- M1 Approved or M1 Rejected
  and coalesce(r.osc_1161, r.osc_1468)::date between :start_date and :end_date  -- Outcome Date
  and r.osc_1468 is not null  -- has a rejected date

Pitfalls:

  • Counts every decided block with a rejected date, dated by Outcome Date (the approved date first), so a block rejected and later approved counts as a rejection where its approval falls, and Approvals plus Rejections can exceed Total Outcomes: 33 of October 2026's 303 M1 blocks held both dates.
  • Counts every M1 rejection, the funding team's and the financier's. The Funding Dashboard's M1 Financier Pass Rate counts only Funding Rejected By = Financier, and dates M1 by the rejected date first; the Weekly KPI Report's M1 First-Pass Approval % counts only Funding Team rejections on project milestone dates (Conflicts 8, 15).
  • Lumen's stored M1 and M2 rows overcounted October 2026 until Load History reloads them (the spec's own note); Phoenix and QuickSight agree.

M1 Funding Total Outcomes

Engineering Dashboard Rejections: Pass Rate gap chart (M1 Funding row, outcomes) · target none
Engineering Dashboard Kalen's Rejection: M1 Funding block: Total Outcomes tile · target none

Also called: M1 Funding total outcomes; outcomes

Definition: M1 funding submissions decided in the range, either way.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data r  -- M1 Funding blocks (PB 26)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1160 is not null  -- M1 Submitted
  and (r.osc_1161 is not null or r.osc_1468 is not null)  -- M1 Approved or M1 Rejected
  and coalesce(r.osc_1161, r.osc_1468)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: M1 Approved (OSC 1161), else M1 Rejected (OSC 1468).
  • Lumen's stored M1 and M2 rows overcounted October 2026 until Load History reloads them (the spec's own note); Phoenix and QuickSight agree.

M1 Funding Rejections Attributed to Engineering

Engineering Dashboard Rejections: Pass Rate gap chart (M1 Funding row, by engineering); Engineering Pass Rate by Month (by eng.) · target none
Engineering Dashboard Kalen's Rejection: M1 Funding block: ENG Attributable tile · target none

Also called: M1 Funding - ENG Attributable; ENG Attributable; by engineering

Definition: M1 funding submissions decided in the range whose rejection attribution names Engineering.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data r  -- M1 Funding blocks (PB 26)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1160 is not null  -- M1 Submitted
  and (r.osc_1161 is not null or r.osc_1468 is not null)  -- M1 Approved or M1 Rejected
  and coalesce(r.osc_1161, r.osc_1468)::date between :start_date and :end_date  -- Outcome Date
  and exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1469) and lv.list_value like '%Engineering%')  -- attributed to Engineering

Pitfalls:

  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.
  • Dated by Outcome Date: M1 Approved (OSC 1161), else M1 Rejected (OSC 1468).
  • Counts the attribution, not the outcome: a block later approved still counts if its attribution names Engineering.
  • Blank, not 0, when none: October 2026 had none for M1 Funding.

M2 Funding Engineering Pass Rate

Engineering Dashboard Rejections: Pass Rate gap chart (M2 Funding row, Engineering pass rate); Engineering Pass Rate by Month (M2 Funding line); Spine reading · target 98%
Engineering Dashboard Rejections (QuickSight): M2 Funding ENG Pass Rate KPI (top row and the M2 Funding section) · target 98%
Engineering Dashboard Kalen's Rejection: M2 Funding block: ENG Pass Rate tile · target 98%
Monthly Review Summary Slide; Engineering Pass Rate slide (M2 Funding); Goals by Month · target 98%

Also called: M2 Funding - ENG Pass Rate; ENG Pass Rate; Engineering pass rate

Definition: Of the M2 funding submissions decided in the range, the share not rejected for a reason Engineering caused.

SQL
select (count(*) - count(*) filter (where exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1531) and lv.list_value like '%Engineering%')))::numeric / nullif(count(*), 0) as value,
  count(*) - count(*) filter (where exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1531) and lv.list_value like '%Engineering%')) as num, count(*) as den
from data_map_1.dm_pb_27_data r  -- M2 Funding blocks (PB 27)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1256 is not null  -- M2 Submitted
  and (r.osc_1257 is not null or r.osc_1533 is not null)  -- M2 Approved or M2 Rejected
  and coalesce(r.osc_1257, r.osc_1533)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.
  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: M2 Approved (OSC 1257), else M2 Rejected (OSC 1533).
  • Lumen's stored M1 and M2 rows overcounted October 2026 until Load History reloads them (the spec's own note); Phoenix and QuickSight agree.
  • Counts every M2 rejection, the funding team's and the financier's. The Funding Dashboard's M2 Financier Pass Rate counts only Funding Rejected By = Financier, and dates by the approved date first; the Weekly KPI Report's M2 First-Pass Approval % counts only Funding Team rejections on project milestone dates (Conflicts 8, 16).

M2 Funding Overall Pass Rate

Engineering Dashboard Rejections: Pass Rate gap chart (M2 Funding row, all causes); Engineering Pass Rate by Month (all causes) · target none
Engineering Dashboard Rejections (QuickSight): M2 Funding Overall Pass Rate KPI · target 98%
Engineering Dashboard Kalen's Rejection: Overall row (M2 Funding); M2 Funding block: Overall Pass Rate tile · target 98%

Also called: M2 Funding - Overall Pass Rate; Overall Pass Rate; approval rate; all causes

Definition: Of the M2 funding submissions decided in the range, the share approved, whatever caused the rejections.

SQL
select count(*) filter (where r.osc_1257 is not null)::numeric / nullif(count(*), 0) as value,
  count(*) filter (where r.osc_1257 is not null) as num, count(*) as den
from data_map_1.dm_pb_27_data r  -- M2 Funding blocks (PB 27)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1256 is not null  -- M2 Submitted
  and (r.osc_1257 is not null or r.osc_1533 is not null)  -- M2 Approved or M2 Rejected
  and coalesce(r.osc_1257, r.osc_1533)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: M2 Approved (OSC 1257), else M2 Rejected (OSC 1533).
  • Lumen's stored M1 and M2 rows overcounted October 2026 until Load History reloads them (the spec's own note); Phoenix and QuickSight agree.
  • Counts every M2 rejection, the funding team's and the financier's. The Funding Dashboard's M2 Financier Pass Rate counts only Funding Rejected By = Financier, and dates by the approved date first; the Weekly KPI Report's M2 First-Pass Approval % counts only Funding Team rejections on project milestone dates (Conflicts 8, 16).

M2 Funding Approvals

Engineering Dashboard Kalen's Rejection: M2 Funding block: Approvals tile · target none

Also called: M2 Funding - Approved; Approvals

Definition: M2 funding submissions approved in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_27_data r  -- M2 Funding blocks (PB 27)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1256 is not null  -- M2 Submitted
  and (r.osc_1257 is not null or r.osc_1533 is not null)  -- M2 Approved or M2 Rejected
  and coalesce(r.osc_1257, r.osc_1533)::date between :start_date and :end_date  -- Outcome Date
  and r.osc_1257 is not null  -- has an approved date

Pitfalls:

  • Dated by Outcome Date: M2 Approved (OSC 1257), else M2 Rejected (OSC 1533).
  • A block with an approved date counts as an approval even if it also has a rejected date.
  • Lumen's stored M1 and M2 rows overcounted October 2026 until Load History reloads them (the spec's own note); Phoenix and QuickSight agree.
  • The Weekly KPI Report counts approvals once per project on the project milestone date, cash deals included; this counts blocks or events (Conflict 18).

M2 Funding Rejections

Engineering Dashboard Kalen's Rejection: M2 Funding block: Rejections tile; Rejections table · target none

Also called: M2 Funding - Rejected; Rejections

Definition: M2 funding submissions rejected in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_27_data r  -- M2 Funding blocks (PB 27)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1256 is not null  -- M2 Submitted
  and (r.osc_1257 is not null or r.osc_1533 is not null)  -- M2 Approved or M2 Rejected
  and coalesce(r.osc_1257, r.osc_1533)::date between :start_date and :end_date  -- Outcome Date
  and r.osc_1533 is not null  -- has a rejected date

Pitfalls:

  • Counts every decided block with a rejected date, dated by Outcome Date (the approved date first), so a block rejected and later approved counts as a rejection where its approval falls, and Approvals plus Rejections can exceed Total Outcomes.
  • Counts every M2 rejection, the funding team's and the financier's. The Funding Dashboard's M2 Financier Pass Rate counts only Funding Rejected By = Financier, and dates by the approved date first; the Weekly KPI Report's M2 First-Pass Approval % counts only Funding Team rejections on project milestone dates (Conflicts 8, 16).
  • Lumen's stored M1 and M2 rows overcounted October 2026 until Load History reloads them (the spec's own note); Phoenix and QuickSight agree.

M2 Funding Total Outcomes

Engineering Dashboard Rejections: Pass Rate gap chart (M2 Funding row, outcomes) · target none
Engineering Dashboard Kalen's Rejection: M2 Funding block: Total Outcomes tile · target none

Also called: M2 Funding total outcomes; outcomes

Definition: M2 funding submissions decided in the range, either way.

SQL
select count(*) as value
from data_map_1.dm_pb_27_data r  -- M2 Funding blocks (PB 27)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1256 is not null  -- M2 Submitted
  and (r.osc_1257 is not null or r.osc_1533 is not null)  -- M2 Approved or M2 Rejected
  and coalesce(r.osc_1257, r.osc_1533)::date between :start_date and :end_date  -- Outcome Date

Pitfalls:

  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.
  • Dated by Outcome Date: M2 Approved (OSC 1257), else M2 Rejected (OSC 1533).
  • Lumen's stored M1 and M2 rows overcounted October 2026 until Load History reloads them (the spec's own note); Phoenix and QuickSight agree.

M2 Funding Rejections Attributed to Engineering

Engineering Dashboard Rejections: Pass Rate gap chart (M2 Funding row, by engineering); Engineering Pass Rate by Month (by eng.) · target none
Engineering Dashboard Kalen's Rejection: M2 Funding block: ENG Attributable tile · target none

Also called: M2 Funding - ENG Attributable; ENG Attributable; by engineering

Definition: M2 funding submissions decided in the range whose rejection attribution names Engineering.

SQL
select count(*) as value
from data_map_1.dm_pb_27_data r  -- M2 Funding blocks (PB 27)
left join data_map_1.dm_project_data p on p.project_id = r.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and r.osc_1256 is not null  -- M2 Submitted
  and (r.osc_1257 is not null or r.osc_1533 is not null)  -- M2 Approved or M2 Rejected
  and coalesce(r.osc_1257, r.osc_1533)::date between :start_date and :end_date  -- Outcome Date
  and exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1531) and lv.list_value like '%Engineering%')  -- attributed to Engineering

Pitfalls:

  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.
  • Dated by Outcome Date: M2 Approved (OSC 1257), else M2 Rejected (OSC 1533).
  • Counts the attribution, not the outcome: a block later approved still counts if its attribution names Engineering.
  • Blank, not 0, when none: October 2026 had none for M2 Funding.

All Types Engineering Pass Rate

Engineering Dashboard Rejections: Engineering Pass Rate by Month (All Types total row) · target none

Also called: All Types; ENG Pass Rate across types

Definition: Of every NEM, permitting, inspection, PTO and M1 and M2 funding decision in the range, the share not rejected for a reason Engineering caused.

SQL
select (count(*) - sum(o.eng))::numeric / nullif(count(*), 0) as value, count(*) - sum(o.eng) as num, count(*) as den
from (
  select case when exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1490) and lv.list_value like '%Engineering%') then 1 else 0 end as eng
  from data_map_1.dm_pb_18_data r  -- NEM Application blocks (PB 18)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1200 is not null  -- Submitted to Utility
    and (r.osc_1206 is not null or r.osc_1207 is not null)  -- NEM Approved or NEM Rejected
    and coalesce(r.osc_1206, r.osc_1207)::date between :start_date and :end_date  -- Outcome Date
  union all
  select case when og.organization_name like '%Engineering%' then 1 else 0 end as eng
  from data_map_1.dm_ev_40_data r  -- Permit Submission events (event 40)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  left join phoenix.organization og on og.id = r.osc_514  -- Permit Rejection Attributable, one organization
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and (r.osc_1511 is not null or r.osc_1512 is not null)  -- Permit Approved or Permit Rejected
    and coalesce(r.osc_1511, r.osc_1512)::date between :start_date and :end_date  -- Outcome Date
  union all
  select case when exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_2349) and lv.list_value like '%Engineering%') then 1 else 0 end as eng
  from data_map_1.dm_ev_42_data r  -- Final Inspection events (event 42)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  cross join lateral (select exists (select 1 from phoenix.list_value o
        where o.id in (r.osc_1070, r.osc_1071, r.osc_1072, r.osc_1073, r.osc_1074, r.osc_1075)
          and o.list_value = 'Failed') as failed) f  -- any of the six outcomes Failed
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.start_time is not null  -- has an inspection date
    and r.start_time::date between :start_date and :end_date  -- Outcome Date
  union all
  select case when exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1491) and lv.list_value like '%Engineering%') then 1 else 0 end as eng
  from data_map_1.dm_pb_28_data r  -- PTO blocks (PB 28)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1223 is not null  -- PTO Submitted
    and (r.osc_1226 is not null or r.osc_1227 is not null)  -- PTO Approved or PTO Rejected
    and coalesce(r.osc_1226, r.osc_1227)::date between :start_date and :end_date  -- Outcome Date
  union all
  select case when exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1469) and lv.list_value like '%Engineering%') then 1 else 0 end as eng
  from data_map_1.dm_pb_26_data r  -- M1 Funding blocks (PB 26)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1160 is not null  -- M1 Submitted
    and (r.osc_1161 is not null or r.osc_1468 is not null)  -- M1 Approved or M1 Rejected
    and coalesce(r.osc_1161, r.osc_1468)::date between :start_date and :end_date  -- Outcome Date
  union all
  select case when exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1531) and lv.list_value like '%Engineering%') then 1 else 0 end as eng
  from data_map_1.dm_pb_27_data r  -- M2 Funding blocks (PB 27)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1256 is not null  -- M2 Submitted
    and (r.osc_1257 is not null or r.osc_1533 is not null)  -- M2 Approved or M2 Rejected
    and coalesce(r.osc_1257, r.osc_1533)::date between :start_date and :end_date  -- Outcome Date
) o

Pitfalls:

  • No single target: each type has its own, and inspections and permits outnumber the rest, so they move it most.
  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.
  • One row per block (permits and inspections: per event) with a decision. A block rejected and later approved counts once, as an approval, dated by the approved date: its rejection drops out of the Overall Pass Rate but, if attributed to Engineering, still counts against the Engineering Pass Rate. 33 of October 2026's 303 M1 blocks held both dates.

Rejections Attributed to Engineering (All Types)

Engineering Dashboard Rejections: Engineering Pass Rate by Month (All Types total row, by eng.); Engineering Rejections Jobs table rows · target none

Also called: ENG Attributable; Engineering Rejections

Definition: NEM, permitting, inspection, PTO and M1 and M2 funding decisions in the range whose attribution names Engineering.

SQL
select sum(o.eng) as value
from (
  select case when exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1490) and lv.list_value like '%Engineering%') then 1 else 0 end as eng
  from data_map_1.dm_pb_18_data r  -- NEM Application blocks (PB 18)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1200 is not null  -- Submitted to Utility
    and (r.osc_1206 is not null or r.osc_1207 is not null)  -- NEM Approved or NEM Rejected
    and coalesce(r.osc_1206, r.osc_1207)::date between :start_date and :end_date  -- Outcome Date
  union all
  select case when og.organization_name like '%Engineering%' then 1 else 0 end as eng
  from data_map_1.dm_ev_40_data r  -- Permit Submission events (event 40)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  left join phoenix.organization og on og.id = r.osc_514  -- Permit Rejection Attributable, one organization
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and (r.osc_1511 is not null or r.osc_1512 is not null)  -- Permit Approved or Permit Rejected
    and coalesce(r.osc_1511, r.osc_1512)::date between :start_date and :end_date  -- Outcome Date
  union all
  select case when exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_2349) and lv.list_value like '%Engineering%') then 1 else 0 end as eng
  from data_map_1.dm_ev_42_data r  -- Final Inspection events (event 42)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  cross join lateral (select exists (select 1 from phoenix.list_value o
        where o.id in (r.osc_1070, r.osc_1071, r.osc_1072, r.osc_1073, r.osc_1074, r.osc_1075)
          and o.list_value = 'Failed') as failed) f  -- any of the six outcomes Failed
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.start_time is not null  -- has an inspection date
    and r.start_time::date between :start_date and :end_date  -- Outcome Date
  union all
  select case when exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1491) and lv.list_value like '%Engineering%') then 1 else 0 end as eng
  from data_map_1.dm_pb_28_data r  -- PTO blocks (PB 28)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1223 is not null  -- PTO Submitted
    and (r.osc_1226 is not null or r.osc_1227 is not null)  -- PTO Approved or PTO Rejected
    and coalesce(r.osc_1226, r.osc_1227)::date between :start_date and :end_date  -- Outcome Date
  union all
  select case when exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1469) and lv.list_value like '%Engineering%') then 1 else 0 end as eng
  from data_map_1.dm_pb_26_data r  -- M1 Funding blocks (PB 26)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1160 is not null  -- M1 Submitted
    and (r.osc_1161 is not null or r.osc_1468 is not null)  -- M1 Approved or M1 Rejected
    and coalesce(r.osc_1161, r.osc_1468)::date between :start_date and :end_date  -- Outcome Date
  union all
  select case when exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1531) and lv.list_value like '%Engineering%') then 1 else 0 end as eng
  from data_map_1.dm_pb_27_data r  -- M2 Funding blocks (PB 27)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1256 is not null  -- M2 Submitted
    and (r.osc_1257 is not null or r.osc_1533 is not null)  -- M2 Approved or M2 Rejected
    and coalesce(r.osc_1257, r.osc_1533)::date between :start_date and :end_date  -- Outcome Date
) o

Pitfalls:

  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.
  • Counts the attribution, not the outcome: an approved block whose attribution still names Engineering counts.

Engineering Rejections by Reason

Engineering Dashboard Rejections: Engineering Rejections by Reason · target none

Also called: Reasons

Definition: Decisions in the range attributed to Engineering, across the six types, counted under each rejection or failure reason picked.

SQL
select o.reason as category, count(*) as value
from (
  select coalesce(rs.list_value, 'No reason given') as reason
  from data_map_1.dm_pb_18_data r  -- NEM Application blocks (PB 18)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  left join phoenix.list_value rs on rs.id = any(r.osc_1208)  -- each reason picked
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1200 is not null  -- Submitted to Utility
    and (r.osc_1206 is not null or r.osc_1207 is not null)  -- NEM Approved or NEM Rejected
    and coalesce(r.osc_1206, r.osc_1207)::date between :start_date and :end_date  -- Outcome Date
    and exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1490) and lv.list_value like '%Engineering%')  -- attributed to Engineering
  union all
  select coalesce(rs.list_value, 'No reason given') as reason
  from data_map_1.dm_ev_40_data r  -- Permit Submission events (event 40)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  left join phoenix.organization og on og.id = r.osc_514  -- Permit Rejection Attributable, one organization
  left join phoenix.list_value rs on rs.id = any(r.osc_513)  -- each reason picked
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and (r.osc_1511 is not null or r.osc_1512 is not null)  -- Permit Approved or Permit Rejected
    and coalesce(r.osc_1511, r.osc_1512)::date between :start_date and :end_date  -- Outcome Date
    and og.organization_name like '%Engineering%'  -- attributed to Engineering
  union all
  select coalesce(rs.list_value, 'No reason given') as reason
  from data_map_1.dm_ev_42_data r  -- Final Inspection events (event 42)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  cross join lateral (select exists (select 1 from phoenix.list_value o
        where o.id in (r.osc_1070, r.osc_1071, r.osc_1072, r.osc_1073, r.osc_1074, r.osc_1075)
          and o.list_value = 'Failed') as failed) f  -- any of the six outcomes Failed
  left join phoenix.list_value rs on rs.id = any(r.osc_727)  -- each reason picked
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.start_time is not null  -- has an inspection date
    and r.start_time::date between :start_date and :end_date  -- Outcome Date
    and exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_2349) and lv.list_value like '%Engineering%')  -- attributed to Engineering
  union all
  select coalesce(rs.list_value, 'No reason given') as reason
  from data_map_1.dm_pb_28_data r  -- PTO blocks (PB 28)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  left join phoenix.list_value rs on rs.id = any(r.osc_1228)  -- each reason picked
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1223 is not null  -- PTO Submitted
    and (r.osc_1226 is not null or r.osc_1227 is not null)  -- PTO Approved or PTO Rejected
    and coalesce(r.osc_1226, r.osc_1227)::date between :start_date and :end_date  -- Outcome Date
    and exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1491) and lv.list_value like '%Engineering%')  -- attributed to Engineering
  union all
  select coalesce(rs.list_value, 'No reason given') as reason
  from data_map_1.dm_pb_26_data r  -- M1 Funding blocks (PB 26)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  left join phoenix.list_value rs on rs.id = any(r.osc_1248)  -- each reason picked
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1160 is not null  -- M1 Submitted
    and (r.osc_1161 is not null or r.osc_1468 is not null)  -- M1 Approved or M1 Rejected
    and coalesce(r.osc_1161, r.osc_1468)::date between :start_date and :end_date  -- Outcome Date
    and exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1469) and lv.list_value like '%Engineering%')  -- attributed to Engineering
  union all
  select coalesce(rs.list_value, 'No reason given') as reason
  from data_map_1.dm_pb_27_data r  -- M2 Funding blocks (PB 27)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  left join phoenix.list_value rs on rs.id = any(r.osc_1259)  -- each reason picked
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1256 is not null  -- M2 Submitted
    and (r.osc_1257 is not null or r.osc_1533 is not null)  -- M2 Approved or M2 Rejected
    and coalesce(r.osc_1257, r.osc_1533)::date between :start_date and :end_date  -- Outcome Date
    and exists (select 1 from phoenix.list_value lv where lv.id = any(r.osc_1531) and lv.list_value like '%Engineering%')  -- attributed to Engineering
) o
group by o.reason
order by value desc

Pitfalls:

  • A decision with several reasons counts under each, so the bars add up to more than the decisions.
  • A decision with no reason shows as No reason given.
  • Engineering attributable means the attribution text contains "Engineering", alone or beside another team ("Field, Engineering"), so a rejection shared with another team counts fully against Engineering. NEM's "Plans" attribution (71 NEM blocks) is not Engineering.

Rejections by Cause and Type

Engineering Dashboard Rejections: Other Causes: Rejections by Cause (stacked by attribution) · target none

Also called: Rejections by Cause; Other Causes

Definition: Rejections and failures in the range by type, split by each team their attribution names.

SQL
select o.type, o.attribution as category, count(*) as value
from (
  select 'NEM' as type, coalesce(a.list_value, 'Not attributed') as attribution
  from data_map_1.dm_pb_18_data r  -- NEM Application blocks (PB 18)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  left join phoenix.list_value a on a.id = any(r.osc_1490)  -- each team named
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1200 is not null  -- Submitted to Utility
    and (r.osc_1206 is not null or r.osc_1207 is not null)  -- NEM Approved or NEM Rejected
    and coalesce(r.osc_1206, r.osc_1207)::date between :start_date and :end_date  -- Outcome Date
    and r.osc_1207 is not null  -- rejected or failed
  union all
  select 'Permitting' as type, coalesce(og.organization_name, 'Not attributed') as attribution
  from data_map_1.dm_ev_40_data r  -- Permit Submission events (event 40)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  left join phoenix.organization og on og.id = r.osc_514  -- Permit Rejection Attributable, one organization
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and (r.osc_1511 is not null or r.osc_1512 is not null)  -- Permit Approved or Permit Rejected
    and coalesce(r.osc_1511, r.osc_1512)::date between :start_date and :end_date  -- Outcome Date
    and r.osc_1512 is not null  -- rejected or failed
  union all
  select 'Inspections' as type, coalesce(a.list_value, 'Not attributed') as attribution
  from data_map_1.dm_ev_42_data r  -- Final Inspection events (event 42)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  cross join lateral (select exists (select 1 from phoenix.list_value o
        where o.id in (r.osc_1070, r.osc_1071, r.osc_1072, r.osc_1073, r.osc_1074, r.osc_1075)
          and o.list_value = 'Failed') as failed) f  -- any of the six outcomes Failed
  left join phoenix.list_value a on a.id = any(r.osc_2349)  -- each team named
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.start_time is not null  -- has an inspection date
    and r.start_time::date between :start_date and :end_date  -- Outcome Date
    and f.failed  -- rejected or failed
  union all
  select 'PTO' as type, coalesce(a.list_value, 'Not attributed') as attribution
  from data_map_1.dm_pb_28_data r  -- PTO blocks (PB 28)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  left join phoenix.list_value a on a.id = any(r.osc_1491)  -- each team named
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1223 is not null  -- PTO Submitted
    and (r.osc_1226 is not null or r.osc_1227 is not null)  -- PTO Approved or PTO Rejected
    and coalesce(r.osc_1226, r.osc_1227)::date between :start_date and :end_date  -- Outcome Date
    and r.osc_1227 is not null  -- rejected or failed
  union all
  select 'M1 Funding' as type, coalesce(a.list_value, 'Not attributed') as attribution
  from data_map_1.dm_pb_26_data r  -- M1 Funding blocks (PB 26)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  left join phoenix.list_value a on a.id = any(r.osc_1469)  -- each team named
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1160 is not null  -- M1 Submitted
    and (r.osc_1161 is not null or r.osc_1468 is not null)  -- M1 Approved or M1 Rejected
    and coalesce(r.osc_1161, r.osc_1468)::date between :start_date and :end_date  -- Outcome Date
    and r.osc_1468 is not null  -- rejected or failed
  union all
  select 'M2 Funding' as type, coalesce(a.list_value, 'Not attributed') as attribution
  from data_map_1.dm_pb_27_data r  -- M2 Funding blocks (PB 27)
  left join data_map_1.dm_project_data p on p.project_id = r.project_id
  left join phoenix.list_value a on a.id = any(r.osc_1531)  -- each team named
  where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and r.osc_1256 is not null  -- M2 Submitted
    and (r.osc_1257 is not null or r.osc_1533 is not null)  -- M2 Approved or M2 Rejected
    and coalesce(r.osc_1257, r.osc_1533)::date between :start_date and :end_date  -- Outcome Date
    and r.osc_1533 is not null  -- rejected or failed
) o
group by o.type, o.attribution
order by o.type, value desc

Pitfalls:

  • A rejection naming two teams counts for each, so a type's bars add up to more than its rejections; Kalen's Rejection's attribution donuts count a combination once, under its whole text.
  • Dated by Outcome Date, so a block rejected and later approved on the same block counts where its approval falls, still as a rejection: its rejected date stays.

In-House Plan Sets Closed

Monthly Review Summary Slide; In-House Plan Sets slide: figure and by-month line; Goals by Month · target none (higher is better)

Also called: In-House Plan Sets; drawn in-house

Definition: Plan sets on Supernova (in-house) jobs that first closed QC Passed or QC Failed in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
join phoenix.project_process_block ppb on ppb.id = b.project_process_block_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and cl.object_status_id is not null
  and cl.changed_at::date between :start_date and :end_date  -- Closed
  and b.date_created >= date '2026-10-07'  -- opened since Supernova plan sets went to permitting
  and not ppb.archived
  and not exists (select 1 from phoenix.project_owner po  -- Third Party Vendor is PremiumCAD
      join phoenix.user_position up on up.id = po.user_position_id
      join phoenix."user" u on u.id = up.user_id
      where po.project_id = p.project_id and po.owner_type_assignment_id in (17, 23) and po.archived = false
        and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%')
  and not exists (select 1 from data_map_1.dm_pb_7_data e7  -- PremiumCAD stamped since 2026-10-07
      join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
      where e7.project_id = p.project_id and e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%')

Pitfalls:

  • In-house is Supernova Savings' job rule: a plan set opened since 2026-10-07, not archived, on a job with no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then. The old draft's rule (a creator who isn't PremiumCAD) is out of date.
  • Every work type, dated by first QC close; Supernova Savings' Plans Created counts Fresh plan sets by Plan Set Created, and PremiumCAD's Plans Created counts PremiumCAD's first submissions (Conflict 14).
  • The numerator of Share Created In-House, which batch 1 lists as Share of Plan Sets Drawn In-House.

In-House Plans Median Working Days

Monthly Review Summary Slide; Working Days for In-House Plans: Median figure and by-month line · target 1 working day

Also called: In-House Plans Median

Definition: Median working days from the scope review's opening to the in-house plan set's first QC close, over in-house plan sets closed in the range.

SQL
select percentile_cont(0.5) within group (order by greatest(0, (trunc(extract(epoch from cl.changed_at - sc.opened))
      - 86400 * (select count(*) from generate_series(sc.opened::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0)) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
join phoenix.project_process_block ppb on ppb.id = b.project_process_block_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join lateral (select s.date_created as opened
    from data_map_1.dm_pb_5_data s
    where s.project_id = b.project_id and s.date_created <= b.date_created and s.date_created >= date '2026-02-15'
    order by s.date_created desc, s.project_process_block_id desc limit 1) sc on true  -- the scope review before it
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and cl.object_status_id is not null
  and cl.changed_at::date between :start_date and :end_date  -- Closed
  and b.date_created >= date '2026-10-07'  -- opened since Supernova plan sets went to permitting
  and not ppb.archived
  and not exists (select 1 from phoenix.project_owner po  -- Third Party Vendor is PremiumCAD
      join phoenix.user_position up on up.id = po.user_position_id
      join phoenix."user" u on u.id = up.user_id
      where po.project_id = p.project_id and po.owner_type_assignment_id in (17, 23) and po.archived = false
        and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%')
  and not exists (select 1 from data_map_1.dm_pb_7_data e7  -- PremiumCAD stamped since 2026-10-07
      join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
      where e7.project_id = p.project_id and e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%')
  and sc.opened is not null  -- has a scope review before it

Pitfalls:

  • The clock starts at the scope review's opening, not the plan set's: Volume & SLAs' Plan Set turnaround starts at the plan set block (Conflict 1), so the two never agree.
  • In-house is Supernova Savings' job rule: a plan set opened since 2026-10-07, not archived, on a job with no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then. The old draft's rule (a creator who isn't PremiumCAD) is out of date.
  • Pairing is within one project by opening time: a stamps block takes the latest plan set opened at or before it, and a plan set the latest scope review opened at or before it, each since 2026-02-15.
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.
  • A plan set with no scope review before it since 2026-02-15 has no figure and drops out.

In-House Plans Average Working Days

Monthly Review Working Days for In-House Plans: Average figure and by-month line · target none

Also called: In-House Plans Average

Definition: Average working days from the scope review's opening to the in-house plan set's first QC close, over in-house plan sets closed in the range.

SQL
select avg(greatest(0, (trunc(extract(epoch from cl.changed_at - sc.opened))
      - 86400 * (select count(*) from generate_series(sc.opened::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0)) as value
from data_map_1.dm_pb_6_data b  -- Plan Set blocks
join data_map_1.dm_project_data p on p.project_id = b.project_id
join phoenix.project_process_block ppb on ppb.id = b.project_process_block_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
left join lateral (select s.date_created as opened
    from data_map_1.dm_pb_5_data s
    where s.project_id = b.project_id and s.date_created <= b.date_created and s.date_created >= date '2026-02-15'
    order by s.date_created desc, s.project_process_block_id desc limit 1) sc on true  -- the scope review before it
where b.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and cl.object_status_id is not null
  and cl.changed_at::date between :start_date and :end_date  -- Closed
  and b.date_created >= date '2026-10-07'  -- opened since Supernova plan sets went to permitting
  and not ppb.archived
  and not exists (select 1 from phoenix.project_owner po  -- Third Party Vendor is PremiumCAD
      join phoenix.user_position up on up.id = po.user_position_id
      join phoenix."user" u on u.id = up.user_id
      where po.project_id = p.project_id and po.owner_type_assignment_id in (17, 23) and po.archived = false
        and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%')
  and not exists (select 1 from data_map_1.dm_pb_7_data e7  -- PremiumCAD stamped since 2026-10-07
      join phoenix.list_value f on f.id in (e7.osc_482, e7.osc_483)
      where e7.project_id = p.project_id and e7.date_created >= date '2026-10-07' and f.list_value ilike 'premiumcad%')
  and sc.opened is not null  -- has a scope review before it

Pitfalls:

  • The clock starts at the scope review's opening, not the plan set's: Volume & SLAs' Plan Set turnaround starts at the plan set block (Conflict 1), so the two never agree.
  • In-house is Supernova Savings' job rule: a plan set opened since 2026-10-07, not archived, on a job with no PremiumCAD Third Party Vendor and no PremiumCAD stamp since then. The old draft's rule (a creator who isn't PremiumCAD) is out of date.
  • Pairing is within one project by opening time: a stamps block takes the latest plan set opened at or before it, and a plan set the latest scope review opened at or before it, each since 2026-02-15.
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.
  • A plan set with no scope review before it since 2026-02-15 has no figure and drops out.
  • A few stuck jobs pull the average well above the median; the target is on the median.

In-House Stamping Median Working Days

Monthly Review Summary Slide; Working Days for In-House Stamping: Median figure and by-month line · target 1 working day

Also called: In-House Stamping Median

Definition: Median working days from opening an Engineering Stamps block stamped by a firm other than PremiumCAD to its first close as Complete, over in-house stamps closed in the range.

SQL
select percentile_cont(0.5) within group (order by greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
      - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0)) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
left join phoenix.list_value sf on sf.id = e.osc_482  -- Structural Firm
left join phoenix.list_value ef on ef.id = e.osc_483  -- Electrical Firm
where e.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date  -- Closed
  and (trim(coalesce(sf.list_value, '')) <> '' or trim(coalesce(ef.list_value, '')) <> '')  -- a firm named
  and coalesce(sf.list_value, '') not ilike '%premiumcad%' and coalesce(ef.list_value, '') not ilike '%premiumcad%'  -- neither PremiumCAD

Pitfalls:

  • In-house here is per stamps block (a structural or electrical firm named, neither PremiumCAD), not Supernova Savings' job rule: a stamps block on a Supernova job stamped by PremiumCAD is not in-house, and one with no firm named is in neither (Conflict 4).
  • Every work type, Revision and As-Built included, unlike Volume & SLAs' stamps (Fresh and Restamp only).
  • A stamps block first closed Canceled has no close and never counts, even if later completed.
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.

In-House Stamping Average Working Days

Monthly Review Working Days for In-House Stamping: Average figure and by-month line · target none

Also called: In-House Stamping Average

Definition: Average working days from opening an Engineering Stamps block stamped by a firm other than PremiumCAD to its first close as Complete, over in-house stamps closed in the range.

SQL
select avg(greatest(0, (trunc(extract(epoch from cl.changed_at - e.date_created))
      - 86400 * (select count(*) from generate_series(e.date_created::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0)) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
left join phoenix.list_value sf on sf.id = e.osc_482  -- Structural Firm
left join phoenix.list_value ef on ef.id = e.osc_483  -- Electrical Firm
where e.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date  -- Closed
  and (trim(coalesce(sf.list_value, '')) <> '' or trim(coalesce(ef.list_value, '')) <> '')  -- a firm named
  and coalesce(sf.list_value, '') not ilike '%premiumcad%' and coalesce(ef.list_value, '') not ilike '%premiumcad%'  -- neither PremiumCAD

Pitfalls:

  • In-house here is per stamps block (a structural or electrical firm named, neither PremiumCAD), not Supernova Savings' job rule: a stamps block on a Supernova job stamped by PremiumCAD is not in-house, and one with no firm named is in neither (Conflict 4).
  • Every work type, Revision and As-Built included, unlike Volume & SLAs' stamps (Fresh and Restamp only).
  • A stamps block first closed Canceled has no close and never counts, even if later completed.
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.
  • A few stuck jobs pull the average well above the median; the target is on the median.

PremiumCAD Scope Review to Stamps Median Working Days

Monthly Review Summary Slide; Working Days for PremiumCAD Plan Sets and Stamps: Median figure and by-month line · target 3 working days

Also called: PremiumCAD Scope Review to Stamps Median

Definition: Median working days from the scope review's opening to the stamps' first close as Complete, on jobs whose plan set PremiumCAD drew, over stamps blocks after a PremiumCAD plan set closed in the range.

SQL
select percentile_cont(0.5) within group (order by greatest(0, (trunc(extract(epoch from cl.changed_at - sc.opened))
      - 86400 * (select count(*) from generate_series(sc.opened::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0)) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
left join lateral (select b.date_created as opened, nullif(trim(concat(u.first_name, ' ', u.last_name)), '') as created_by
    from data_map_1.dm_pb_6_data b
    left join phoenix.user_position up on up.id = b.osc_454  -- Plan Set Created By
    left join phoenix."user" u on u.id = up.user_id
    where b.project_id = e.project_id and b.date_created <= e.date_created and b.date_created >= date '2026-02-15'
    order by b.date_created desc, b.project_process_block_id desc limit 1) pl on true  -- the plan set before it
left join lateral (select s.date_created as opened
    from data_map_1.dm_pb_5_data s
    where s.project_id = e.project_id and s.date_created <= pl.opened and s.date_created >= date '2026-02-15'
    order by s.date_created desc, s.project_process_block_id desc limit 1) sc on true  -- the scope review before it
where e.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date  -- Closed
  and pl.created_by is not null and (pl.created_by ilike '%premiumcad%' or exists (select 1 from phoenix.project_owner po  -- Third Party Vendor is PremiumCAD
      join phoenix.user_position up on up.id = po.user_position_id
      join phoenix."user" u on u.id = up.user_id
      where po.project_id = p.project_id and po.owner_type_assignment_id in (17, 23) and po.archived = false
        and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'))  -- PremiumCAD's plan set
  and sc.opened is not null  -- has a scope review

Pitfalls:

  • A PremiumCAD plan set is one whose Plan Set Created By account is PremiumCAD, or any named creator on a job whose Third Party Vendor is PremiumCAD; a plan set with no creator named is neither.
  • Volume & SLAs' Scope to Stamps row (batch 1: Scope Review to Stamps: Median Working Days) takes every stamps block closed Complete under the same 3-day target; this takes PremiumCAD's jobs only (Conflict 12).
  • Pairing is within one project by opening time: a stamps block takes the latest plan set opened at or before it, and a plan set the latest scope review opened at or before it, each since 2026-02-15.
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.

PremiumCAD Scope Review to Stamps Average Working Days

Monthly Review Working Days for PremiumCAD Plan Sets and Stamps: Average figure and by-month line · target none

Also called: PremiumCAD Scope Review to Stamps Average

Definition: Average working days from the scope review's opening to the stamps' first close as Complete, on jobs whose plan set PremiumCAD drew, over stamps blocks after a PremiumCAD plan set closed in the range.

SQL
select avg(greatest(0, (trunc(extract(epoch from cl.changed_at - sc.opened))
      - 86400 * (select count(*) from generate_series(sc.opened::date, cl.changed_at::date, interval '1 day') g
                 where extract(isodow from g) > 5)) / 86400.0)) as value
from data_map_1.dm_pb_7_data e  -- Engineering Stamps blocks
join data_map_1.dm_project_data p on p.project_id = e.project_id
left join (select distinct on (au.project_process_block_id)
      au.project_process_block_id, au.changed_at, au.object_status_id
    from phoenix.project_process_block_audit au
    where au.process_block_id = 7 and au.object_status_id in (8, 9)  -- Complete or Canceled
    order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = e.project_process_block_id  -- the block's first close
left join lateral (select b.date_created as opened, nullif(trim(concat(u.first_name, ' ', u.last_name)), '') as created_by
    from data_map_1.dm_pb_6_data b
    left join phoenix.user_position up on up.id = b.osc_454  -- Plan Set Created By
    left join phoenix."user" u on u.id = up.user_id
    where b.project_id = e.project_id and b.date_created <= e.date_created and b.date_created >= date '2026-02-15'
    order by b.date_created desc, b.project_process_block_id desc limit 1) pl on true  -- the plan set before it
left join lateral (select s.date_created as opened
    from data_map_1.dm_pb_5_data s
    where s.project_id = e.project_id and s.date_created <= pl.opened and s.date_created >= date '2026-02-15'
    order by s.date_created desc, s.project_process_block_id desc limit 1) sc on true  -- the scope review before it
where e.date_created >= date '2026-02-15'  -- the datasets' date floor
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and cl.object_status_id = 8  -- first close was Complete
  and cl.changed_at::date between :start_date and :end_date  -- Closed
  and pl.created_by is not null and (pl.created_by ilike '%premiumcad%' or exists (select 1 from phoenix.project_owner po  -- Third Party Vendor is PremiumCAD
      join phoenix.user_position up on up.id = po.user_position_id
      join phoenix."user" u on u.id = up.user_id
      where po.project_id = p.project_id and po.owner_type_assignment_id in (17, 23) and po.archived = false
        and concat(u.first_name, ' ', u.last_name) ilike '%premiumcad%'))  -- PremiumCAD's plan set
  and sc.opened is not null  -- has a scope review

Pitfalls:

  • A PremiumCAD plan set is one whose Plan Set Created By account is PremiumCAD, or any named creator on a job whose Third Party Vendor is PremiumCAD; a plan set with no creator named is neither.
  • Volume & SLAs' Scope to Stamps row (batch 1: Scope Review to Stamps: Median Working Days) takes every stamps block closed Complete under the same 3-day target; this takes PremiumCAD's jobs only (Conflict 12).
  • Pairing is within one project by opening time: a stamps block takes the latest plan set opened at or before it, and a plan set the latest scope review opened at or before it, each since 2026-02-15.
  • Working days are elapsed time less whole Saturdays and Sundays, fractional; holidays count as working days.
  • A few stuck jobs pull the average well above the median; the target is on the median.

Engineering Out vs In

Monthly Review Summary Slide; Engineering Out vs In slide: meter and by-month line · target 100%

Also called: Out vs In; plan sets out over in

Definition: Plan sets that first closed QC Passed or QC Failed in the range, over plan sets opened in the range; under 100%, the backlog grew.

SQL
select (select count(*)
  from data_map_1.dm_pb_6_data b  -- Plan Set blocks
  join data_map_1.dm_project_data p on p.project_id = b.project_id
  join phoenix.project_process_block ppb on ppb.id = b.project_process_block_id
  left join (select distinct on (au.project_process_block_id)
        au.project_process_block_id, au.changed_at, au.object_status_id
      from phoenix.project_process_block_audit au
      where au.process_block_id = 6 and au.object_status_id in (29, 30)  -- QC Passed or QC Failed
      order by au.project_process_block_id, au.changed_at) cl on cl.project_process_block_id = b.project_process_block_id  -- the block's first close
  where b.date_created >= date '2026-02-15'  -- the datasets' date floor
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and cl.object_status_id is not null
    and cl.changed_at::date between :start_date and :end_date  -- Closed
  )::numeric / nullif((select count(*)
    from data_map_1.dm_pb_6_data b  -- Plan Set blocks
    join data_map_1.dm_project_data p on p.project_id = b.project_id
    where b.date_created >= date '2026-02-15'  -- the datasets' date floor
      and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      and b.date_created::date between :start_date and :end_date  -- Opened
  ), 0) as value

Pitfalls:

  • Two populations on two dates: plan sets opened in the range can close after it, and those closed in it were often opened before. Volume & SLAs shows the same pair as Net (done less requested), batch 1's Plan Set Net (Conflict 5).
  • Every work type, QC Failed closes included: a plan set QC fails and is fixed on the same block counts once, at its first QC close.
  • Plan Sets In and Plan Sets Out on the same slide are batch 1's Plan Set Blocks Requested and Plan Set Blocks Done.

Total Forecasted Installs

Install Forecast Install Forecast: Total Forecasted Installs tile · target none
Install Forecast Install Forecast: Installs by Month, Actual and Forecast (bars, 2026 and 2027 whatever the range) · target Static Forecast (the line)
Install Forecast Install Forecast: Installs by Forecast Tier board (Units) · target none
Install Forecast By State: Ohio, Virginia, Other States and Pennsylvania Installs vs Capacity (bars) · target the state's Capacity (the line)

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Forecasted Installs; Units; Installs by Forecast Tier

Definition: Installs done plus installs expected, by predicted install date: actual installs, the active pipeline spread over its likely install dates and discounted for cancellations, and 58% of the sales targets.

SQL
select round(sum(f.unit_count), 1) as value
from (
  -- 1. actuals: install verified (OSC 671) since 2026, every project type, 1 unit each
  select p.osc_671::date as predicted_date, s.abbreviation as state_abbr, 'Actual' as tier, 1.0 as unit_count,
    round(coalesce(ac.osc_28::numeric, 0), 2) as weighted_package_price, ac.osc_35::numeric as system_size_kw
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  left join data_map_1.dm_pb_3_data ac on ac.project_id = p.project_id and ac.main = true and ac.archived = false
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_671 >= '2026-01-01'
  union all
  -- 2. the pipeline: each active project, spread over its scenarios
  select b.d, pb.state_abbr, pb.tier, b.u, round(coalesce(pb.package_price::numeric, 0) * b.u, 2), pb.system_size_kw::numeric
  from (select p.project_id, s.abbreviation as state_abbr, c.osc_28 as package_price, c.osc_35 as system_size_kw,
      se.scheduled_install_date, se.slippage_applies,
      case
        when se.scheduled_install_date is not null then 'S'
        when piv.project_id is not null then 'P'
        when ws.project_id is not null then 'W'
        when p.osc_667 is not null and sh.project_id is null then 'R'
        when p.osc_667 is not null and sh.estimated_rts_date is not null then 'H'
        when p.osc_666 is not null then 'A'
        when epd.expected_permit_date is not null then 'E'
        when p.osc_663 is not null then 'F'
        when p.osc_662 is not null then 'L'
        when p.osc_687 is not null then 'D'
        when p.osc_660 is not null then 'X'
      end as tier,
      case
        when se.scheduled_install_date is not null or piv.project_id is not null or ws.project_id is not null or p.osc_667 is not null then 1.00
        when p.osc_666 is not null or epd.expected_permit_date is not null then 0.95
        when p.osc_663 is not null or p.osc_662 is not null then 0.90
        else 0.80
      end as retention_factor,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then null
        when ws.project_id is not null then ws.work_started_date
        when p.osc_667 is not null and sh.project_id is null then p.osc_667
        when p.osc_667 is not null and sh.estimated_rts_date is not null then sh.estimated_rts_date
        when p.osc_666 is not null then p.osc_666
        when epd.expected_permit_date is not null then epd.expected_permit_date
        when p.osc_663 is not null then p.osc_663
        when p.osc_662 is not null then p.osc_662
        when p.osc_687 is not null then p.osc_687
        when p.osc_660 is not null then p.osc_660
      end as milestone_date,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 0
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p25
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p25
        when p.osc_663 is not null then sm.permit_p25
        when p.osc_662 is not null then sm.plan_set_p25
        when p.osc_687 is not null then sm.deal_review_p25
        else sm.sold_p25
      end as tier_p25,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 0
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p50
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p50
        when p.osc_663 is not null then sm.permit_p50
        when p.osc_662 is not null then sm.plan_set_p50
        when p.osc_687 is not null then sm.deal_review_p50
        else sm.sold_p50
      end as tier_p50,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 5
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p75
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p75
        when p.osc_663 is not null then sm.permit_p75
        when p.osc_662 is not null then sm.plan_set_p75
        when p.osc_687 is not null then sm.deal_review_p75
        else sm.sold_p75
      end as tier_p75
    from data_map_1.dm_project_data p
    join phoenix.state s on s.id = p.state_id
    join phoenix.object_status os on os.id = p.object_status_id
    join phoenix.base_status bs on bs.id = os.base_status_id
    join (select s.abbreviation as state,
        case when count(d.rts) >= 30 then percentile_cont(0.25) within group (order by d.rts) else 11 end::int as rts_p25,
        case when count(d.rts) >= 30 then percentile_cont(0.50) within group (order by d.rts) else 22 end::int as rts_p50,
        case when count(d.rts) >= 30 then percentile_cont(0.75) within group (order by d.rts) else 44 end::int as rts_p75,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.25) within group (order by d.permits_approved) else 19 end::int as permits_approved_p25,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.50) within group (order by d.permits_approved) else 33 end::int as permits_approved_p50,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.75) within group (order by d.permits_approved) else 63 end::int as permits_approved_p75,
        case when count(d.permit) >= 30 then percentile_cont(0.25) within group (order by d.permit) else 32 end::int as permit_p25,
        case when count(d.permit) >= 30 then percentile_cont(0.50) within group (order by d.permit) else 59 end::int as permit_p50,
        case when count(d.permit) >= 30 then percentile_cont(0.75) within group (order by d.permit) else 85 end::int as permit_p75,
        case when count(d.plan_set) >= 30 then percentile_cont(0.25) within group (order by d.plan_set) else 43 end::int as plan_set_p25,
        case when count(d.plan_set) >= 30 then percentile_cont(0.50) within group (order by d.plan_set) else 68 end::int as plan_set_p50,
        case when count(d.plan_set) >= 30 then percentile_cont(0.75) within group (order by d.plan_set) else 100 end::int as plan_set_p75,
        case when count(d.deal_review) >= 30 then percentile_cont(0.25) within group (order by d.deal_review) else 42 end::int as deal_review_p25,
        case when count(d.deal_review) >= 30 then percentile_cont(0.50) within group (order by d.deal_review) else 67 end::int as deal_review_p50,
        case when count(d.deal_review) >= 30 then percentile_cont(0.75) within group (order by d.deal_review) else 95 end::int as deal_review_p75,
        case when count(d.sold) >= 30 then percentile_cont(0.25) within group (order by d.sold) else 55 end::int as sold_p25,
        case when count(d.sold) >= 30 then percentile_cont(0.50) within group (order by d.sold) else 83 end::int as sold_p50,
        case when count(d.sold) >= 30 then percentile_cont(0.75) within group (order by d.sold) else 115 end::int as sold_p75
      from data_map_1.dm_project_data p
      join phoenix.state s on s.id = p.state_id
      cross join lateral (select case when p.osc_671 - p.osc_667 > 0 then p.osc_671 - p.osc_667 end as rts,
          case when p.osc_671 - p.osc_666 > 0 then p.osc_671 - p.osc_666 end as permits_approved,
          case when p.osc_671 - p.osc_663 > 0 then p.osc_671 - p.osc_663 end as permit,
          case when p.osc_671 - p.osc_662 > 0 then p.osc_671 - p.osc_662 end as plan_set,
          case when p.osc_671 - p.osc_687 > 0 then p.osc_671 - p.osc_687 end as deal_review,
          case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
      where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
        and p.osc_660 >= '2025-01-01' and s.abbreviation != 'PA'
      group by s.abbreviation
      union all
      -- Pennsylvania: its own projects, every year, no 30-project minimum
      select 'PA',
        percentile_cont(0.25) within group (order by d.rts)::int,
        percentile_cont(0.50) within group (order by d.rts)::int,
        percentile_cont(0.75) within group (order by d.rts)::int,
        percentile_cont(0.25) within group (order by d.permits_approved)::int,
        percentile_cont(0.50) within group (order by d.permits_approved)::int,
        percentile_cont(0.75) within group (order by d.permits_approved)::int,
        percentile_cont(0.25) within group (order by d.permit)::int,
        percentile_cont(0.50) within group (order by d.permit)::int,
        percentile_cont(0.75) within group (order by d.permit)::int,
        percentile_cont(0.25) within group (order by d.plan_set)::int,
        percentile_cont(0.50) within group (order by d.plan_set)::int,
        percentile_cont(0.75) within group (order by d.plan_set)::int,
        percentile_cont(0.25) within group (order by d.deal_review)::int,
        percentile_cont(0.50) within group (order by d.deal_review)::int,
        percentile_cont(0.75) within group (order by d.deal_review)::int,
        percentile_cont(0.25) within group (order by d.sold)::int,
        percentile_cont(0.50) within group (order by d.sold)::int,
        percentile_cont(0.75) within group (order by d.sold)::int
      from data_map_1.dm_project_data p
      join phoenix.state s on s.id = p.state_id
      cross join lateral (select case when p.osc_671 - p.osc_667 > 0 then p.osc_671 - p.osc_667 end as rts,
          case when p.osc_671 - p.osc_666 > 0 then p.osc_671 - p.osc_666 end as permits_approved,
          case when p.osc_671 - p.osc_663 > 0 then p.osc_671 - p.osc_663 end as permit,
          case when p.osc_671 - p.osc_662 > 0 then p.osc_671 - p.osc_662 end as plan_set,
          case when p.osc_671 - p.osc_687 > 0 then p.osc_671 - p.osc_687 end as deal_review,
          case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
      where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0 and s.abbreviation = 'PA') sm on sm.state = s.abbreviation
    left join (SELECT DISTINCT ON (combined.project_id)
        combined.project_id,
        combined.scheduled_start_date,
        combined.scheduled_install_date,
        combined.event_status,
        combined.slippage_applies
      FROM (
        SELECT
          ev.project_id,
          ev.start_time::date AS scheduled_start_date,
          ev.end_time::date AS scheduled_install_date,
          ev_os.object_status AS event_status,
          (ev.osc_824::varchar LIKE '%426%' OR ev.osc_824::varchar LIKE '%427%') AS slippage_applies,
          ev.end_time AS sort_date
        FROM data_map_1.dm_ev_41_data ev
        JOIN phoenix.object_status ev_os ON ev_os.id = ev.object_status_id
        JOIN phoenix.base_status ev_bs ON ev_bs.id = ev_os.base_status_id
        WHERE ev.archived = false
          AND ev.start_time IS NOT NULL
          AND ev.end_time IS NOT NULL
          AND ev.end_time >= CURRENT_DATE
          AND ev_bs.base_status NOT IN ('COMPLETE', 'CANCELED')
        UNION ALL
        SELECT
          ev.project_id,
          ev.start_time::date AS scheduled_start_date,
          ev.end_time::date AS scheduled_install_date,
          ev_os.object_status AS event_status,
          FALSE AS slippage_applies,
          ev.end_time AS sort_date
        FROM data_map_1.dm_ev_43_data ev
        JOIN phoenix.object_status ev_os ON ev_os.id = ev.object_status_id
        JOIN phoenix.base_status ev_bs ON ev_bs.id = ev_os.base_status_id
        WHERE ev.archived = false
          AND ev.end_time IS NOT NULL
          AND ev.end_time >= CURRENT_DATE
          AND ev_bs.base_status NOT IN ('COMPLETE', 'CANCELED')
      ) combined
      ORDER BY combined.project_id, combined.sort_date DESC) se on se.project_id = p.project_id
    left join (SELECT DISTINCT p.project_id
      FROM data_map_1.dm_project_data p
      JOIN phoenix.object_status os ON os.id = p.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      JOIN (
        SELECT project_id, MAX(end_time::date) AS latest_completed_appt
        FROM (
          SELECT project_id, end_time
          FROM data_map_1.dm_ev_41_data ev
          JOIN phoenix.object_status os2 ON os2.id = ev.object_status_id
          JOIN phoenix.base_status bs2 ON bs2.id = os2.base_status_id
          WHERE ev.archived = false AND ev.end_time IS NOT NULL
            AND bs2.base_status = 'COMPLETE'
          UNION ALL
          SELECT project_id, end_time
          FROM data_map_1.dm_ev_43_data ev
          JOIN phoenix.object_status os2 ON os2.id = ev.object_status_id
          JOIN phoenix.base_status bs2 ON bs2.id = os2.base_status_id
          WHERE ev.archived = false AND ev.end_time IS NOT NULL
            AND bs2.base_status = 'COMPLETE'
        ) completed_events
        GROUP BY project_id
      ) recent ON recent.project_id = p.project_id
        AND recent.latest_completed_appt >= CURRENT_DATE - INTERVAL '3 days'
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_671 IS NULL
        AND bs.base_status NOT IN ('COMPLETE','CANCELED')) piv on piv.project_id = p.project_id
    left join (SELECT
        p.project_id,
        p.osc_669::date AS work_started_date
      FROM data_map_1.dm_project_data p
      JOIN phoenix.object_status os ON os.id = p.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_669 IS NOT NULL
        AND p.osc_671 IS NULL
        AND bs.base_status NOT IN ('COMPLETE', 'CANCELED')
        AND (CURRENT_DATE - p.osc_669::date) <= 30) ws on ws.project_id = p.project_id
    left join (SELECT
        project_id,
        osc_1176::date AS estimated_rts_date
      FROM data_map_1.dm_pb_11_data
      WHERE osc_633 IS NOT NULL
        AND osc_635 IS NULL) sh on sh.project_id = p.project_id
    left join (SELECT DISTINCT ON (ev.project_id)
        ev.project_id,
        ev.osc_511::date AS expected_permit_date
      FROM data_map_1.dm_ev_40_data ev
      JOIN phoenix.object_status os ON os.id = ev.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      WHERE ev.archived = false
        AND ev.osc_511 IS NOT NULL
        AND ev.osc_511::date >= CURRENT_DATE
        AND bs.base_status NOT IN ('COMPLETE', 'CANCELED')
      ORDER BY ev.project_id, ev.start_time DESC) epd on epd.project_id = p.project_id
    left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true and c.archived = false
    left join phoenix.record r on r.id = c.osc_849
    where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
      and bs.base_status not in ('COMPLETE', 'CANCELED')
      and p.osc_671 is null
      and coalesce(r.record_name, '') not ilike '%mosaic%'
      and coalesce(r.record_name, '') not ilike '%sunnova%'
      and p.object_status_id not in (58, 206, 83, 63)  -- Retention and other excluded statuses
      and p.object_type_id != 7  -- not Roof / R&R
      and p.project_id not in (select project_id from data_map_1.dm_pb_20_data where object_status_id in (84, 207, 86))  -- compliance
      and p.osc_676 is null) pb
  cross join lateral (
    -- scheduled: the appointment day, a Standard Install 60% there and 40% a week later
    select (pb.scheduled_install_date + o.d * interval '1 day')::date as d, o.w * pb.retention_factor as u
    from (values (0, 0.6, true), (7, 0.4, true), (0, 1.0, false)) o(d, w, slip)
    where pb.scheduled_install_date is not null and o.slip = coalesce(pb.slippage_applies, false)
    union all
    -- pending IV: today, 1 unit
    select current_date, 1.0 where pb.tier = 'P'
    union all
    -- everything else: milestone + P25/P50/P75 days (never before today), thirds; halves on P25/P50 once overdue
    select greatest((pb.milestone_date + o.d * interval '1 day')::date, (current_date + o.d * interval '1 day')::date),
      case when (pb.milestone_date + pb.tier_p50 * interval '1 day')::date < current_date then 0.5 else round(1.0 / 3.0, 4) end * pb.retention_factor
    from unnest(case when (pb.milestone_date + pb.tier_p50 * interval '1 day')::date < current_date then array[pb.tier_p25, pb.tier_p50]
      else array[pb.tier_p25, pb.tier_p50, pb.tier_p75] end) o(d)
    where pb.scheduled_install_date is null and pb.milestone_date is not null and pb.tier != 'P'
  ) b
  union all
  -- 3. forecasted sales: future weeks' sales target x 58%, a third on each scenario, $30,607.03 and 8.877 kW apiece
  select (sw.week_start + o.d * interval '1 day')::date, sw.state_abbr, 'Forecasted Sale', round(sw.weekly_units / 3.0 * wm.w, 4),
    round(30607.03 * (sw.weekly_units / 3.0 * wm.w), 2), 8.877
  from (SELECT
        sfr.state_abbr, weeks.week_start, sfr.sale_month,
        CASE
          WHEN ROW_NUMBER() OVER (PARTITION BY sfr.state_abbr, sfr.sale_month ORDER BY weeks.week_start) = 1
            THEN FLOOR(sfr.forecast_units * 0.58) - (FLOOR(FLOOR(sfr.forecast_units * 0.58)::numeric / COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month)) * (COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month) - 1))::int
          ELSE FLOOR(FLOOR(sfr.forecast_units * 0.58)::numeric / COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month))::int
        END AS weekly_units,
        sm.sold_p25, sm.sold_p50, sm.sold_p75
      FROM (SELECT *
      FROM (VALUES
        ('VA','2026-12-01'::date,75),('VA','2027-02-01'::date,65),('VA','2027-03-01'::date,115),('VA','2027-04-01'::date,260),('VA','2027-05-01'::date,395),('VA','2027-06-01'::date,435),('VA','2027-07-01'::date,510),('VA','2027-08-01'::date,410),('VA','2027-09-01'::date,150),('VA','2027-10-01'::date,100),('VA','2027-11-01'::date,100),('VA','2027-12-01'::date,35),('OH','2026-12-01'::date,95),('OH','2027-01-01'::date,50),('OH','2027-02-01'::date,95),('OH','2027-03-01'::date,125),('OH','2027-04-01'::date,220),('OH','2027-05-01'::date,370),('OH','2027-06-01'::date,370),('OH','2027-07-01'::date,370),('OH','2027-08-01'::date,360),('OH','2027-09-01'::date,200),('OH','2027-10-01'::date,150),('OH','2027-11-01'::date,135),('OH','2027-12-01'::date,100)) AS t(state_abbr, sale_month, forecast_units)
      WHERE forecast_units > 0
        AND sale_month >= DATE_TRUNC('month', CURRENT_DATE)) sfr JOIN (select s.abbreviation as state,
    case when count(d.sold) >= 30 then percentile_cont(0.25) within group (order by d.sold) else 55 end::int as sold_p25,
    case when count(d.sold) >= 30 then percentile_cont(0.50) within group (order by d.sold) else 83 end::int as sold_p50,
    case when count(d.sold) >= 30 then percentile_cont(0.75) within group (order by d.sold) else 115 end::int as sold_p75
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  cross join lateral (select case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_660 >= '2025-01-01' and s.abbreviation != 'PA'
  group by s.abbreviation
  union all
  -- Pennsylvania: its own projects, every year, no 30-project minimum
  select 'PA',
    percentile_cont(0.25) within group (order by d.sold)::int,
    percentile_cont(0.50) within group (order by d.sold)::int,
    percentile_cont(0.75) within group (order by d.sold)::int
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  cross join lateral (select case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0 and s.abbreviation = 'PA') sm ON sm.state = sfr.state_abbr
      JOIN LATERAL (
        SELECT gs::date AS week_start
        FROM GENERATE_SERIES(
          GREATEST(
            DATE_TRUNC('week', sfr.sale_month + INTERVAL '1 day')::date,
            (DATE_TRUNC('week', CURRENT_DATE) + INTERVAL '7 days')::date
          ),
          (sfr.sale_month + INTERVAL '1 month - 1 day')::date,
          INTERVAL '1 week'
        ) gs
        WHERE gs >= sfr.sale_month
      ) weeks ON true) sw
  cross join lateral (values (sw.sold_p25), (sw.sold_p50), (sw.sold_p75)) o(d)
  join (values ('VA', 1.0), ('OH', 0.5), ('OH', 0.5), ('PA', 1.0), ('MI', 1.0), ('IL', 1.0), ('CA', 1.0), ('FL', 1.0),
    ('CO', 1.0), ('WA', 1.0), ('TX', 1.0), ('OR', 1.0), ('UT', 1.0)) wm(state_abbr, w) on wm.state_abbr = sw.state_abbr  -- Ohio splits over two warehouses
) f
where f.predicted_date::date between :start_date and :end_date

Pitfalls:

  • A forecast as of today: every load recomputes it from today's date, so a future month's figure moves daily. Past months hold only actual installs.
  • Lumen counts every project; QuickSight's sheet keeps only projects its Lumio join marks non-liability (is_lumio_non_liability = 0), so its totals run lower (Brendan accepted the gap, 2026-11-06).
  • Actual installs count every project type (Install Verified, OSC 671, since 2026), so a past month equals the Executive Dashboard's Install Verified (All Types): 248 in October 2026. The pipeline leaves out Roof / R&R, Mosaic and Sunnova jobs, compliance jobs, statuses 58, 63, 83 and 206, and anything with PTO.
  • Weights: a scheduled Standard Install puts 0.6 on its appointment day and 0.4 a week later, other scheduled events 1.0; a pending IV (appointment completed in the last 3 days) 1.0 today; every other active project a third on each of milestone + P25, P50 and P75 days to install, or a half on P25 and P50 once its P50 date has passed, times a retention factor (1.00 from RTS on, 0.95 permits, 0.90 permit-ready and plan set, 0.80 earlier).
  • Forecasted sales are the state targets (Virginia and Ohio only from December 2026) × 58%, spread over the month's remaining weeks, then over each week's sold-to-install P25, P50 and P75. Ohio's are split over two warehouses at half weight.
  • The active pipeline is small next to the sales targets: on 2026-12-02 it held 309 projects (84 scheduled, 73 at RTS), worth 309 units over December to April, while 2027 is 2,751 units of forecasted sales.
  • Pennsylvania's timelines: the Logic text says it borrows Virginia's, but the SQL reads Pennsylvania's own installs (every year, no 30-install minimum; 132 RTS-to-install pairs on 2026-12-02). The M1 Forecast does borrow Virginia's.
  • The Total Forecast + Actuals chart keeps 2026 and 2027 whatever the page's range; the tiles read the range (this year by default).
  • The By State charts split Ohio, Virginia and Pennsylvania from "Other States" by the project's state; a forecasted sale carries its target's state.

Total Forecasted kW

Install Forecast Install Forecast: Total Forecasted kW tile · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Total Forecasted Watts (QuickSight's title)

Definition: The system size of the installs done or expected, in kW, by predicted install date.

SQL
select round(sum(f.system_size_kw), 1) as value  -- each row's whole system size, unweighted
from (
  -- 1. actuals: install verified (OSC 671) since 2026, every project type, 1 unit each
  select p.osc_671::date as predicted_date, s.abbreviation as state_abbr, 'Actual' as tier, 1.0 as unit_count,
    round(coalesce(ac.osc_28::numeric, 0), 2) as weighted_package_price, ac.osc_35::numeric as system_size_kw
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  left join data_map_1.dm_pb_3_data ac on ac.project_id = p.project_id and ac.main = true and ac.archived = false
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_671 >= '2026-01-01'
  union all
  -- 2. the pipeline: each active project, spread over its scenarios
  select b.d, pb.state_abbr, pb.tier, b.u, round(coalesce(pb.package_price::numeric, 0) * b.u, 2), pb.system_size_kw::numeric
  from (select p.project_id, s.abbreviation as state_abbr, c.osc_28 as package_price, c.osc_35 as system_size_kw,
      se.scheduled_install_date, se.slippage_applies,
      case
        when se.scheduled_install_date is not null then 'S'
        when piv.project_id is not null then 'P'
        when ws.project_id is not null then 'W'
        when p.osc_667 is not null and sh.project_id is null then 'R'
        when p.osc_667 is not null and sh.estimated_rts_date is not null then 'H'
        when p.osc_666 is not null then 'A'
        when epd.expected_permit_date is not null then 'E'
        when p.osc_663 is not null then 'F'
        when p.osc_662 is not null then 'L'
        when p.osc_687 is not null then 'D'
        when p.osc_660 is not null then 'X'
      end as tier,
      case
        when se.scheduled_install_date is not null or piv.project_id is not null or ws.project_id is not null or p.osc_667 is not null then 1.00
        when p.osc_666 is not null or epd.expected_permit_date is not null then 0.95
        when p.osc_663 is not null or p.osc_662 is not null then 0.90
        else 0.80
      end as retention_factor,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then null
        when ws.project_id is not null then ws.work_started_date
        when p.osc_667 is not null and sh.project_id is null then p.osc_667
        when p.osc_667 is not null and sh.estimated_rts_date is not null then sh.estimated_rts_date
        when p.osc_666 is not null then p.osc_666
        when epd.expected_permit_date is not null then epd.expected_permit_date
        when p.osc_663 is not null then p.osc_663
        when p.osc_662 is not null then p.osc_662
        when p.osc_687 is not null then p.osc_687
        when p.osc_660 is not null then p.osc_660
      end as milestone_date,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 0
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p25
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p25
        when p.osc_663 is not null then sm.permit_p25
        when p.osc_662 is not null then sm.plan_set_p25
        when p.osc_687 is not null then sm.deal_review_p25
        else sm.sold_p25
      end as tier_p25,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 0
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p50
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p50
        when p.osc_663 is not null then sm.permit_p50
        when p.osc_662 is not null then sm.plan_set_p50
        when p.osc_687 is not null then sm.deal_review_p50
        else sm.sold_p50
      end as tier_p50,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 5
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p75
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p75
        when p.osc_663 is not null then sm.permit_p75
        when p.osc_662 is not null then sm.plan_set_p75
        when p.osc_687 is not null then sm.deal_review_p75
        else sm.sold_p75
      end as tier_p75
    from data_map_1.dm_project_data p
    join phoenix.state s on s.id = p.state_id
    join phoenix.object_status os on os.id = p.object_status_id
    join phoenix.base_status bs on bs.id = os.base_status_id
    join (select s.abbreviation as state,
        case when count(d.rts) >= 30 then percentile_cont(0.25) within group (order by d.rts) else 11 end::int as rts_p25,
        case when count(d.rts) >= 30 then percentile_cont(0.50) within group (order by d.rts) else 22 end::int as rts_p50,
        case when count(d.rts) >= 30 then percentile_cont(0.75) within group (order by d.rts) else 44 end::int as rts_p75,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.25) within group (order by d.permits_approved) else 19 end::int as permits_approved_p25,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.50) within group (order by d.permits_approved) else 33 end::int as permits_approved_p50,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.75) within group (order by d.permits_approved) else 63 end::int as permits_approved_p75,
        case when count(d.permit) >= 30 then percentile_cont(0.25) within group (order by d.permit) else 32 end::int as permit_p25,
        case when count(d.permit) >= 30 then percentile_cont(0.50) within group (order by d.permit) else 59 end::int as permit_p50,
        case when count(d.permit) >= 30 then percentile_cont(0.75) within group (order by d.permit) else 85 end::int as permit_p75,
        case when count(d.plan_set) >= 30 then percentile_cont(0.25) within group (order by d.plan_set) else 43 end::int as plan_set_p25,
        case when count(d.plan_set) >= 30 then percentile_cont(0.50) within group (order by d.plan_set) else 68 end::int as plan_set_p50,
        case when count(d.plan_set) >= 30 then percentile_cont(0.75) within group (order by d.plan_set) else 100 end::int as plan_set_p75,
        case when count(d.deal_review) >= 30 then percentile_cont(0.25) within group (order by d.deal_review) else 42 end::int as deal_review_p25,
        case when count(d.deal_review) >= 30 then percentile_cont(0.50) within group (order by d.deal_review) else 67 end::int as deal_review_p50,
        case when count(d.deal_review) >= 30 then percentile_cont(0.75) within group (order by d.deal_review) else 95 end::int as deal_review_p75,
        case when count(d.sold) >= 30 then percentile_cont(0.25) within group (order by d.sold) else 55 end::int as sold_p25,
        case when count(d.sold) >= 30 then percentile_cont(0.50) within group (order by d.sold) else 83 end::int as sold_p50,
        case when count(d.sold) >= 30 then percentile_cont(0.75) within group (order by d.sold) else 115 end::int as sold_p75
      from data_map_1.dm_project_data p
      join phoenix.state s on s.id = p.state_id
      cross join lateral (select case when p.osc_671 - p.osc_667 > 0 then p.osc_671 - p.osc_667 end as rts,
          case when p.osc_671 - p.osc_666 > 0 then p.osc_671 - p.osc_666 end as permits_approved,
          case when p.osc_671 - p.osc_663 > 0 then p.osc_671 - p.osc_663 end as permit,
          case when p.osc_671 - p.osc_662 > 0 then p.osc_671 - p.osc_662 end as plan_set,
          case when p.osc_671 - p.osc_687 > 0 then p.osc_671 - p.osc_687 end as deal_review,
          case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
      where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
        and p.osc_660 >= '2025-01-01' and s.abbreviation != 'PA'
      group by s.abbreviation
      union all
      -- Pennsylvania: its own projects, every year, no 30-project minimum
      select 'PA',
        percentile_cont(0.25) within group (order by d.rts)::int,
        percentile_cont(0.50) within group (order by d.rts)::int,
        percentile_cont(0.75) within group (order by d.rts)::int,
        percentile_cont(0.25) within group (order by d.permits_approved)::int,
        percentile_cont(0.50) within group (order by d.permits_approved)::int,
        percentile_cont(0.75) within group (order by d.permits_approved)::int,
        percentile_cont(0.25) within group (order by d.permit)::int,
        percentile_cont(0.50) within group (order by d.permit)::int,
        percentile_cont(0.75) within group (order by d.permit)::int,
        percentile_cont(0.25) within group (order by d.plan_set)::int,
        percentile_cont(0.50) within group (order by d.plan_set)::int,
        percentile_cont(0.75) within group (order by d.plan_set)::int,
        percentile_cont(0.25) within group (order by d.deal_review)::int,
        percentile_cont(0.50) within group (order by d.deal_review)::int,
        percentile_cont(0.75) within group (order by d.deal_review)::int,
        percentile_cont(0.25) within group (order by d.sold)::int,
        percentile_cont(0.50) within group (order by d.sold)::int,
        percentile_cont(0.75) within group (order by d.sold)::int
      from data_map_1.dm_project_data p
      join phoenix.state s on s.id = p.state_id
      cross join lateral (select case when p.osc_671 - p.osc_667 > 0 then p.osc_671 - p.osc_667 end as rts,
          case when p.osc_671 - p.osc_666 > 0 then p.osc_671 - p.osc_666 end as permits_approved,
          case when p.osc_671 - p.osc_663 > 0 then p.osc_671 - p.osc_663 end as permit,
          case when p.osc_671 - p.osc_662 > 0 then p.osc_671 - p.osc_662 end as plan_set,
          case when p.osc_671 - p.osc_687 > 0 then p.osc_671 - p.osc_687 end as deal_review,
          case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
      where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0 and s.abbreviation = 'PA') sm on sm.state = s.abbreviation
    left join (SELECT DISTINCT ON (combined.project_id)
        combined.project_id,
        combined.scheduled_start_date,
        combined.scheduled_install_date,
        combined.event_status,
        combined.slippage_applies
      FROM (
        SELECT
          ev.project_id,
          ev.start_time::date AS scheduled_start_date,
          ev.end_time::date AS scheduled_install_date,
          ev_os.object_status AS event_status,
          (ev.osc_824::varchar LIKE '%426%' OR ev.osc_824::varchar LIKE '%427%') AS slippage_applies,
          ev.end_time AS sort_date
        FROM data_map_1.dm_ev_41_data ev
        JOIN phoenix.object_status ev_os ON ev_os.id = ev.object_status_id
        JOIN phoenix.base_status ev_bs ON ev_bs.id = ev_os.base_status_id
        WHERE ev.archived = false
          AND ev.start_time IS NOT NULL
          AND ev.end_time IS NOT NULL
          AND ev.end_time >= CURRENT_DATE
          AND ev_bs.base_status NOT IN ('COMPLETE', 'CANCELED')
        UNION ALL
        SELECT
          ev.project_id,
          ev.start_time::date AS scheduled_start_date,
          ev.end_time::date AS scheduled_install_date,
          ev_os.object_status AS event_status,
          FALSE AS slippage_applies,
          ev.end_time AS sort_date
        FROM data_map_1.dm_ev_43_data ev
        JOIN phoenix.object_status ev_os ON ev_os.id = ev.object_status_id
        JOIN phoenix.base_status ev_bs ON ev_bs.id = ev_os.base_status_id
        WHERE ev.archived = false
          AND ev.end_time IS NOT NULL
          AND ev.end_time >= CURRENT_DATE
          AND ev_bs.base_status NOT IN ('COMPLETE', 'CANCELED')
      ) combined
      ORDER BY combined.project_id, combined.sort_date DESC) se on se.project_id = p.project_id
    left join (SELECT DISTINCT p.project_id
      FROM data_map_1.dm_project_data p
      JOIN phoenix.object_status os ON os.id = p.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      JOIN (
        SELECT project_id, MAX(end_time::date) AS latest_completed_appt
        FROM (
          SELECT project_id, end_time
          FROM data_map_1.dm_ev_41_data ev
          JOIN phoenix.object_status os2 ON os2.id = ev.object_status_id
          JOIN phoenix.base_status bs2 ON bs2.id = os2.base_status_id
          WHERE ev.archived = false AND ev.end_time IS NOT NULL
            AND bs2.base_status = 'COMPLETE'
          UNION ALL
          SELECT project_id, end_time
          FROM data_map_1.dm_ev_43_data ev
          JOIN phoenix.object_status os2 ON os2.id = ev.object_status_id
          JOIN phoenix.base_status bs2 ON bs2.id = os2.base_status_id
          WHERE ev.archived = false AND ev.end_time IS NOT NULL
            AND bs2.base_status = 'COMPLETE'
        ) completed_events
        GROUP BY project_id
      ) recent ON recent.project_id = p.project_id
        AND recent.latest_completed_appt >= CURRENT_DATE - INTERVAL '3 days'
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_671 IS NULL
        AND bs.base_status NOT IN ('COMPLETE','CANCELED')) piv on piv.project_id = p.project_id
    left join (SELECT
        p.project_id,
        p.osc_669::date AS work_started_date
      FROM data_map_1.dm_project_data p
      JOIN phoenix.object_status os ON os.id = p.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_669 IS NOT NULL
        AND p.osc_671 IS NULL
        AND bs.base_status NOT IN ('COMPLETE', 'CANCELED')
        AND (CURRENT_DATE - p.osc_669::date) <= 30) ws on ws.project_id = p.project_id
    left join (SELECT
        project_id,
        osc_1176::date AS estimated_rts_date
      FROM data_map_1.dm_pb_11_data
      WHERE osc_633 IS NOT NULL
        AND osc_635 IS NULL) sh on sh.project_id = p.project_id
    left join (SELECT DISTINCT ON (ev.project_id)
        ev.project_id,
        ev.osc_511::date AS expected_permit_date
      FROM data_map_1.dm_ev_40_data ev
      JOIN phoenix.object_status os ON os.id = ev.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      WHERE ev.archived = false
        AND ev.osc_511 IS NOT NULL
        AND ev.osc_511::date >= CURRENT_DATE
        AND bs.base_status NOT IN ('COMPLETE', 'CANCELED')
      ORDER BY ev.project_id, ev.start_time DESC) epd on epd.project_id = p.project_id
    left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true and c.archived = false
    left join phoenix.record r on r.id = c.osc_849
    where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
      and bs.base_status not in ('COMPLETE', 'CANCELED')
      and p.osc_671 is null
      and coalesce(r.record_name, '') not ilike '%mosaic%'
      and coalesce(r.record_name, '') not ilike '%sunnova%'
      and p.object_status_id not in (58, 206, 83, 63)  -- Retention and other excluded statuses
      and p.object_type_id != 7  -- not Roof / R&R
      and p.project_id not in (select project_id from data_map_1.dm_pb_20_data where object_status_id in (84, 207, 86))  -- compliance
      and p.osc_676 is null) pb
  cross join lateral (
    -- scheduled: the appointment day, a Standard Install 60% there and 40% a week later
    select (pb.scheduled_install_date + o.d * interval '1 day')::date as d, o.w * pb.retention_factor as u
    from (values (0, 0.6, true), (7, 0.4, true), (0, 1.0, false)) o(d, w, slip)
    where pb.scheduled_install_date is not null and o.slip = coalesce(pb.slippage_applies, false)
    union all
    -- pending IV: today, 1 unit
    select current_date, 1.0 where pb.tier = 'P'
    union all
    -- everything else: milestone + P25/P50/P75 days (never before today), thirds; halves on P25/P50 once overdue
    select greatest((pb.milestone_date + o.d * interval '1 day')::date, (current_date + o.d * interval '1 day')::date),
      case when (pb.milestone_date + pb.tier_p50 * interval '1 day')::date < current_date then 0.5 else round(1.0 / 3.0, 4) end * pb.retention_factor
    from unnest(case when (pb.milestone_date + pb.tier_p50 * interval '1 day')::date < current_date then array[pb.tier_p25, pb.tier_p50]
      else array[pb.tier_p25, pb.tier_p50, pb.tier_p75] end) o(d)
    where pb.scheduled_install_date is null and pb.milestone_date is not null and pb.tier != 'P'
  ) b
  union all
  -- 3. forecasted sales: future weeks' sales target x 58%, a third on each scenario, $30,607.03 and 8.877 kW apiece
  select (sw.week_start + o.d * interval '1 day')::date, sw.state_abbr, 'Forecasted Sale', round(sw.weekly_units / 3.0 * wm.w, 4),
    round(30607.03 * (sw.weekly_units / 3.0 * wm.w), 2), 8.877
  from (SELECT
        sfr.state_abbr, weeks.week_start, sfr.sale_month,
        CASE
          WHEN ROW_NUMBER() OVER (PARTITION BY sfr.state_abbr, sfr.sale_month ORDER BY weeks.week_start) = 1
            THEN FLOOR(sfr.forecast_units * 0.58) - (FLOOR(FLOOR(sfr.forecast_units * 0.58)::numeric / COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month)) * (COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month) - 1))::int
          ELSE FLOOR(FLOOR(sfr.forecast_units * 0.58)::numeric / COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month))::int
        END AS weekly_units,
        sm.sold_p25, sm.sold_p50, sm.sold_p75
      FROM (SELECT *
      FROM (VALUES
        ('VA','2026-12-01'::date,75),('VA','2027-02-01'::date,65),('VA','2027-03-01'::date,115),('VA','2027-04-01'::date,260),('VA','2027-05-01'::date,395),('VA','2027-06-01'::date,435),('VA','2027-07-01'::date,510),('VA','2027-08-01'::date,410),('VA','2027-09-01'::date,150),('VA','2027-10-01'::date,100),('VA','2027-11-01'::date,100),('VA','2027-12-01'::date,35),('OH','2026-12-01'::date,95),('OH','2027-01-01'::date,50),('OH','2027-02-01'::date,95),('OH','2027-03-01'::date,125),('OH','2027-04-01'::date,220),('OH','2027-05-01'::date,370),('OH','2027-06-01'::date,370),('OH','2027-07-01'::date,370),('OH','2027-08-01'::date,360),('OH','2027-09-01'::date,200),('OH','2027-10-01'::date,150),('OH','2027-11-01'::date,135),('OH','2027-12-01'::date,100)) AS t(state_abbr, sale_month, forecast_units)
      WHERE forecast_units > 0
        AND sale_month >= DATE_TRUNC('month', CURRENT_DATE)) sfr JOIN (select s.abbreviation as state,
    case when count(d.sold) >= 30 then percentile_cont(0.25) within group (order by d.sold) else 55 end::int as sold_p25,
    case when count(d.sold) >= 30 then percentile_cont(0.50) within group (order by d.sold) else 83 end::int as sold_p50,
    case when count(d.sold) >= 30 then percentile_cont(0.75) within group (order by d.sold) else 115 end::int as sold_p75
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  cross join lateral (select case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_660 >= '2025-01-01' and s.abbreviation != 'PA'
  group by s.abbreviation
  union all
  -- Pennsylvania: its own projects, every year, no 30-project minimum
  select 'PA',
    percentile_cont(0.25) within group (order by d.sold)::int,
    percentile_cont(0.50) within group (order by d.sold)::int,
    percentile_cont(0.75) within group (order by d.sold)::int
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  cross join lateral (select case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0 and s.abbreviation = 'PA') sm ON sm.state = sfr.state_abbr
      JOIN LATERAL (
        SELECT gs::date AS week_start
        FROM GENERATE_SERIES(
          GREATEST(
            DATE_TRUNC('week', sfr.sale_month + INTERVAL '1 day')::date,
            (DATE_TRUNC('week', CURRENT_DATE) + INTERVAL '7 days')::date
          ),
          (sfr.sale_month + INTERVAL '1 month - 1 day')::date,
          INTERVAL '1 week'
        ) gs
        WHERE gs >= sfr.sale_month
      ) weeks ON true) sw
  cross join lateral (values (sw.sold_p25), (sw.sold_p50), (sw.sold_p75)) o(d)
  join (values ('VA', 1.0), ('OH', 0.5), ('OH', 0.5), ('PA', 1.0), ('MI', 1.0), ('IL', 1.0), ('CA', 1.0), ('FL', 1.0),
    ('CO', 1.0), ('WA', 1.0), ('TX', 1.0), ('OR', 1.0), ('UT', 1.0)) wm(state_abbr, w) on wm.state_abbr = sw.state_abbr  -- Ohio splits over two warehouses
) f
where f.predicted_date::date between :start_date and :end_date

Pitfalls:

  • A forecast as of today: every load recomputes it from today's date, so a future month's figure moves daily. Past months hold only actual installs.
  • Lumen counts every project; QuickSight's sheet keeps only projects its Lumio join marks non-liability (is_lumio_non_liability = 0), so its totals run lower (Brendan accepted the gap, 2026-11-06).
  • Not weighted: a pipeline project's full contract kW (main contract, OSC 35) counts on each of its two or three scenario rows, and every forecasted-sale row adds a flat 8.877 kW however few units it carries. In 2026 the pipeline's 174 units carry 2,978 kW, about 17 kW a unit against 8.9 for actual installs (Conflict 30).
  • The dataset has a weighted kW column the page doesn't use.
  • Actual installs use the main contract's kW, not the installed size that the Executive Dashboard's Installed kW (True Size) prefers.

Total Forecasted Revenue

Install Forecast Install Forecast: Total Forecasted Revenue tile · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Forecasted revenue; weighted package price

Definition: The package price of the installs done or expected, each row's price times its units, by predicted install date.

SQL
select round(sum(f.weighted_package_price), 2) as value
from (
  -- 1. actuals: install verified (OSC 671) since 2026, every project type, 1 unit each
  select p.osc_671::date as predicted_date, s.abbreviation as state_abbr, 'Actual' as tier, 1.0 as unit_count,
    round(coalesce(ac.osc_28::numeric, 0), 2) as weighted_package_price, ac.osc_35::numeric as system_size_kw
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  left join data_map_1.dm_pb_3_data ac on ac.project_id = p.project_id and ac.main = true and ac.archived = false
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_671 >= '2026-01-01'
  union all
  -- 2. the pipeline: each active project, spread over its scenarios
  select b.d, pb.state_abbr, pb.tier, b.u, round(coalesce(pb.package_price::numeric, 0) * b.u, 2), pb.system_size_kw::numeric
  from (select p.project_id, s.abbreviation as state_abbr, c.osc_28 as package_price, c.osc_35 as system_size_kw,
      se.scheduled_install_date, se.slippage_applies,
      case
        when se.scheduled_install_date is not null then 'S'
        when piv.project_id is not null then 'P'
        when ws.project_id is not null then 'W'
        when p.osc_667 is not null and sh.project_id is null then 'R'
        when p.osc_667 is not null and sh.estimated_rts_date is not null then 'H'
        when p.osc_666 is not null then 'A'
        when epd.expected_permit_date is not null then 'E'
        when p.osc_663 is not null then 'F'
        when p.osc_662 is not null then 'L'
        when p.osc_687 is not null then 'D'
        when p.osc_660 is not null then 'X'
      end as tier,
      case
        when se.scheduled_install_date is not null or piv.project_id is not null or ws.project_id is not null or p.osc_667 is not null then 1.00
        when p.osc_666 is not null or epd.expected_permit_date is not null then 0.95
        when p.osc_663 is not null or p.osc_662 is not null then 0.90
        else 0.80
      end as retention_factor,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then null
        when ws.project_id is not null then ws.work_started_date
        when p.osc_667 is not null and sh.project_id is null then p.osc_667
        when p.osc_667 is not null and sh.estimated_rts_date is not null then sh.estimated_rts_date
        when p.osc_666 is not null then p.osc_666
        when epd.expected_permit_date is not null then epd.expected_permit_date
        when p.osc_663 is not null then p.osc_663
        when p.osc_662 is not null then p.osc_662
        when p.osc_687 is not null then p.osc_687
        when p.osc_660 is not null then p.osc_660
      end as milestone_date,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 0
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p25
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p25
        when p.osc_663 is not null then sm.permit_p25
        when p.osc_662 is not null then sm.plan_set_p25
        when p.osc_687 is not null then sm.deal_review_p25
        else sm.sold_p25
      end as tier_p25,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 0
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p50
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p50
        when p.osc_663 is not null then sm.permit_p50
        when p.osc_662 is not null then sm.plan_set_p50
        when p.osc_687 is not null then sm.deal_review_p50
        else sm.sold_p50
      end as tier_p50,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 5
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p75
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p75
        when p.osc_663 is not null then sm.permit_p75
        when p.osc_662 is not null then sm.plan_set_p75
        when p.osc_687 is not null then sm.deal_review_p75
        else sm.sold_p75
      end as tier_p75
    from data_map_1.dm_project_data p
    join phoenix.state s on s.id = p.state_id
    join phoenix.object_status os on os.id = p.object_status_id
    join phoenix.base_status bs on bs.id = os.base_status_id
    join (select s.abbreviation as state,
        case when count(d.rts) >= 30 then percentile_cont(0.25) within group (order by d.rts) else 11 end::int as rts_p25,
        case when count(d.rts) >= 30 then percentile_cont(0.50) within group (order by d.rts) else 22 end::int as rts_p50,
        case when count(d.rts) >= 30 then percentile_cont(0.75) within group (order by d.rts) else 44 end::int as rts_p75,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.25) within group (order by d.permits_approved) else 19 end::int as permits_approved_p25,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.50) within group (order by d.permits_approved) else 33 end::int as permits_approved_p50,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.75) within group (order by d.permits_approved) else 63 end::int as permits_approved_p75,
        case when count(d.permit) >= 30 then percentile_cont(0.25) within group (order by d.permit) else 32 end::int as permit_p25,
        case when count(d.permit) >= 30 then percentile_cont(0.50) within group (order by d.permit) else 59 end::int as permit_p50,
        case when count(d.permit) >= 30 then percentile_cont(0.75) within group (order by d.permit) else 85 end::int as permit_p75,
        case when count(d.plan_set) >= 30 then percentile_cont(0.25) within group (order by d.plan_set) else 43 end::int as plan_set_p25,
        case when count(d.plan_set) >= 30 then percentile_cont(0.50) within group (order by d.plan_set) else 68 end::int as plan_set_p50,
        case when count(d.plan_set) >= 30 then percentile_cont(0.75) within group (order by d.plan_set) else 100 end::int as plan_set_p75,
        case when count(d.deal_review) >= 30 then percentile_cont(0.25) within group (order by d.deal_review) else 42 end::int as deal_review_p25,
        case when count(d.deal_review) >= 30 then percentile_cont(0.50) within group (order by d.deal_review) else 67 end::int as deal_review_p50,
        case when count(d.deal_review) >= 30 then percentile_cont(0.75) within group (order by d.deal_review) else 95 end::int as deal_review_p75,
        case when count(d.sold) >= 30 then percentile_cont(0.25) within group (order by d.sold) else 55 end::int as sold_p25,
        case when count(d.sold) >= 30 then percentile_cont(0.50) within group (order by d.sold) else 83 end::int as sold_p50,
        case when count(d.sold) >= 30 then percentile_cont(0.75) within group (order by d.sold) else 115 end::int as sold_p75
      from data_map_1.dm_project_data p
      join phoenix.state s on s.id = p.state_id
      cross join lateral (select case when p.osc_671 - p.osc_667 > 0 then p.osc_671 - p.osc_667 end as rts,
          case when p.osc_671 - p.osc_666 > 0 then p.osc_671 - p.osc_666 end as permits_approved,
          case when p.osc_671 - p.osc_663 > 0 then p.osc_671 - p.osc_663 end as permit,
          case when p.osc_671 - p.osc_662 > 0 then p.osc_671 - p.osc_662 end as plan_set,
          case when p.osc_671 - p.osc_687 > 0 then p.osc_671 - p.osc_687 end as deal_review,
          case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
      where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
        and p.osc_660 >= '2025-01-01' and s.abbreviation != 'PA'
      group by s.abbreviation
      union all
      -- Pennsylvania: its own projects, every year, no 30-project minimum
      select 'PA',
        percentile_cont(0.25) within group (order by d.rts)::int,
        percentile_cont(0.50) within group (order by d.rts)::int,
        percentile_cont(0.75) within group (order by d.rts)::int,
        percentile_cont(0.25) within group (order by d.permits_approved)::int,
        percentile_cont(0.50) within group (order by d.permits_approved)::int,
        percentile_cont(0.75) within group (order by d.permits_approved)::int,
        percentile_cont(0.25) within group (order by d.permit)::int,
        percentile_cont(0.50) within group (order by d.permit)::int,
        percentile_cont(0.75) within group (order by d.permit)::int,
        percentile_cont(0.25) within group (order by d.plan_set)::int,
        percentile_cont(0.50) within group (order by d.plan_set)::int,
        percentile_cont(0.75) within group (order by d.plan_set)::int,
        percentile_cont(0.25) within group (order by d.deal_review)::int,
        percentile_cont(0.50) within group (order by d.deal_review)::int,
        percentile_cont(0.75) within group (order by d.deal_review)::int,
        percentile_cont(0.25) within group (order by d.sold)::int,
        percentile_cont(0.50) within group (order by d.sold)::int,
        percentile_cont(0.75) within group (order by d.sold)::int
      from data_map_1.dm_project_data p
      join phoenix.state s on s.id = p.state_id
      cross join lateral (select case when p.osc_671 - p.osc_667 > 0 then p.osc_671 - p.osc_667 end as rts,
          case when p.osc_671 - p.osc_666 > 0 then p.osc_671 - p.osc_666 end as permits_approved,
          case when p.osc_671 - p.osc_663 > 0 then p.osc_671 - p.osc_663 end as permit,
          case when p.osc_671 - p.osc_662 > 0 then p.osc_671 - p.osc_662 end as plan_set,
          case when p.osc_671 - p.osc_687 > 0 then p.osc_671 - p.osc_687 end as deal_review,
          case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
      where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0 and s.abbreviation = 'PA') sm on sm.state = s.abbreviation
    left join (SELECT DISTINCT ON (combined.project_id)
        combined.project_id,
        combined.scheduled_start_date,
        combined.scheduled_install_date,
        combined.event_status,
        combined.slippage_applies
      FROM (
        SELECT
          ev.project_id,
          ev.start_time::date AS scheduled_start_date,
          ev.end_time::date AS scheduled_install_date,
          ev_os.object_status AS event_status,
          (ev.osc_824::varchar LIKE '%426%' OR ev.osc_824::varchar LIKE '%427%') AS slippage_applies,
          ev.end_time AS sort_date
        FROM data_map_1.dm_ev_41_data ev
        JOIN phoenix.object_status ev_os ON ev_os.id = ev.object_status_id
        JOIN phoenix.base_status ev_bs ON ev_bs.id = ev_os.base_status_id
        WHERE ev.archived = false
          AND ev.start_time IS NOT NULL
          AND ev.end_time IS NOT NULL
          AND ev.end_time >= CURRENT_DATE
          AND ev_bs.base_status NOT IN ('COMPLETE', 'CANCELED')
        UNION ALL
        SELECT
          ev.project_id,
          ev.start_time::date AS scheduled_start_date,
          ev.end_time::date AS scheduled_install_date,
          ev_os.object_status AS event_status,
          FALSE AS slippage_applies,
          ev.end_time AS sort_date
        FROM data_map_1.dm_ev_43_data ev
        JOIN phoenix.object_status ev_os ON ev_os.id = ev.object_status_id
        JOIN phoenix.base_status ev_bs ON ev_bs.id = ev_os.base_status_id
        WHERE ev.archived = false
          AND ev.end_time IS NOT NULL
          AND ev.end_time >= CURRENT_DATE
          AND ev_bs.base_status NOT IN ('COMPLETE', 'CANCELED')
      ) combined
      ORDER BY combined.project_id, combined.sort_date DESC) se on se.project_id = p.project_id
    left join (SELECT DISTINCT p.project_id
      FROM data_map_1.dm_project_data p
      JOIN phoenix.object_status os ON os.id = p.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      JOIN (
        SELECT project_id, MAX(end_time::date) AS latest_completed_appt
        FROM (
          SELECT project_id, end_time
          FROM data_map_1.dm_ev_41_data ev
          JOIN phoenix.object_status os2 ON os2.id = ev.object_status_id
          JOIN phoenix.base_status bs2 ON bs2.id = os2.base_status_id
          WHERE ev.archived = false AND ev.end_time IS NOT NULL
            AND bs2.base_status = 'COMPLETE'
          UNION ALL
          SELECT project_id, end_time
          FROM data_map_1.dm_ev_43_data ev
          JOIN phoenix.object_status os2 ON os2.id = ev.object_status_id
          JOIN phoenix.base_status bs2 ON bs2.id = os2.base_status_id
          WHERE ev.archived = false AND ev.end_time IS NOT NULL
            AND bs2.base_status = 'COMPLETE'
        ) completed_events
        GROUP BY project_id
      ) recent ON recent.project_id = p.project_id
        AND recent.latest_completed_appt >= CURRENT_DATE - INTERVAL '3 days'
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_671 IS NULL
        AND bs.base_status NOT IN ('COMPLETE','CANCELED')) piv on piv.project_id = p.project_id
    left join (SELECT
        p.project_id,
        p.osc_669::date AS work_started_date
      FROM data_map_1.dm_project_data p
      JOIN phoenix.object_status os ON os.id = p.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_669 IS NOT NULL
        AND p.osc_671 IS NULL
        AND bs.base_status NOT IN ('COMPLETE', 'CANCELED')
        AND (CURRENT_DATE - p.osc_669::date) <= 30) ws on ws.project_id = p.project_id
    left join (SELECT
        project_id,
        osc_1176::date AS estimated_rts_date
      FROM data_map_1.dm_pb_11_data
      WHERE osc_633 IS NOT NULL
        AND osc_635 IS NULL) sh on sh.project_id = p.project_id
    left join (SELECT DISTINCT ON (ev.project_id)
        ev.project_id,
        ev.osc_511::date AS expected_permit_date
      FROM data_map_1.dm_ev_40_data ev
      JOIN phoenix.object_status os ON os.id = ev.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      WHERE ev.archived = false
        AND ev.osc_511 IS NOT NULL
        AND ev.osc_511::date >= CURRENT_DATE
        AND bs.base_status NOT IN ('COMPLETE', 'CANCELED')
      ORDER BY ev.project_id, ev.start_time DESC) epd on epd.project_id = p.project_id
    left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true and c.archived = false
    left join phoenix.record r on r.id = c.osc_849
    where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
      and bs.base_status not in ('COMPLETE', 'CANCELED')
      and p.osc_671 is null
      and coalesce(r.record_name, '') not ilike '%mosaic%'
      and coalesce(r.record_name, '') not ilike '%sunnova%'
      and p.object_status_id not in (58, 206, 83, 63)  -- Retention and other excluded statuses
      and p.object_type_id != 7  -- not Roof / R&R
      and p.project_id not in (select project_id from data_map_1.dm_pb_20_data where object_status_id in (84, 207, 86))  -- compliance
      and p.osc_676 is null) pb
  cross join lateral (
    -- scheduled: the appointment day, a Standard Install 60% there and 40% a week later
    select (pb.scheduled_install_date + o.d * interval '1 day')::date as d, o.w * pb.retention_factor as u
    from (values (0, 0.6, true), (7, 0.4, true), (0, 1.0, false)) o(d, w, slip)
    where pb.scheduled_install_date is not null and o.slip = coalesce(pb.slippage_applies, false)
    union all
    -- pending IV: today, 1 unit
    select current_date, 1.0 where pb.tier = 'P'
    union all
    -- everything else: milestone + P25/P50/P75 days (never before today), thirds; halves on P25/P50 once overdue
    select greatest((pb.milestone_date + o.d * interval '1 day')::date, (current_date + o.d * interval '1 day')::date),
      case when (pb.milestone_date + pb.tier_p50 * interval '1 day')::date < current_date then 0.5 else round(1.0 / 3.0, 4) end * pb.retention_factor
    from unnest(case when (pb.milestone_date + pb.tier_p50 * interval '1 day')::date < current_date then array[pb.tier_p25, pb.tier_p50]
      else array[pb.tier_p25, pb.tier_p50, pb.tier_p75] end) o(d)
    where pb.scheduled_install_date is null and pb.milestone_date is not null and pb.tier != 'P'
  ) b
  union all
  -- 3. forecasted sales: future weeks' sales target x 58%, a third on each scenario, $30,607.03 and 8.877 kW apiece
  select (sw.week_start + o.d * interval '1 day')::date, sw.state_abbr, 'Forecasted Sale', round(sw.weekly_units / 3.0 * wm.w, 4),
    round(30607.03 * (sw.weekly_units / 3.0 * wm.w), 2), 8.877
  from (SELECT
        sfr.state_abbr, weeks.week_start, sfr.sale_month,
        CASE
          WHEN ROW_NUMBER() OVER (PARTITION BY sfr.state_abbr, sfr.sale_month ORDER BY weeks.week_start) = 1
            THEN FLOOR(sfr.forecast_units * 0.58) - (FLOOR(FLOOR(sfr.forecast_units * 0.58)::numeric / COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month)) * (COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month) - 1))::int
          ELSE FLOOR(FLOOR(sfr.forecast_units * 0.58)::numeric / COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month))::int
        END AS weekly_units,
        sm.sold_p25, sm.sold_p50, sm.sold_p75
      FROM (SELECT *
      FROM (VALUES
        ('VA','2026-12-01'::date,75),('VA','2027-02-01'::date,65),('VA','2027-03-01'::date,115),('VA','2027-04-01'::date,260),('VA','2027-05-01'::date,395),('VA','2027-06-01'::date,435),('VA','2027-07-01'::date,510),('VA','2027-08-01'::date,410),('VA','2027-09-01'::date,150),('VA','2027-10-01'::date,100),('VA','2027-11-01'::date,100),('VA','2027-12-01'::date,35),('OH','2026-12-01'::date,95),('OH','2027-01-01'::date,50),('OH','2027-02-01'::date,95),('OH','2027-03-01'::date,125),('OH','2027-04-01'::date,220),('OH','2027-05-01'::date,370),('OH','2027-06-01'::date,370),('OH','2027-07-01'::date,370),('OH','2027-08-01'::date,360),('OH','2027-09-01'::date,200),('OH','2027-10-01'::date,150),('OH','2027-11-01'::date,135),('OH','2027-12-01'::date,100)) AS t(state_abbr, sale_month, forecast_units)
      WHERE forecast_units > 0
        AND sale_month >= DATE_TRUNC('month', CURRENT_DATE)) sfr JOIN (select s.abbreviation as state,
    case when count(d.sold) >= 30 then percentile_cont(0.25) within group (order by d.sold) else 55 end::int as sold_p25,
    case when count(d.sold) >= 30 then percentile_cont(0.50) within group (order by d.sold) else 83 end::int as sold_p50,
    case when count(d.sold) >= 30 then percentile_cont(0.75) within group (order by d.sold) else 115 end::int as sold_p75
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  cross join lateral (select case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_660 >= '2025-01-01' and s.abbreviation != 'PA'
  group by s.abbreviation
  union all
  -- Pennsylvania: its own projects, every year, no 30-project minimum
  select 'PA',
    percentile_cont(0.25) within group (order by d.sold)::int,
    percentile_cont(0.50) within group (order by d.sold)::int,
    percentile_cont(0.75) within group (order by d.sold)::int
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  cross join lateral (select case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0 and s.abbreviation = 'PA') sm ON sm.state = sfr.state_abbr
      JOIN LATERAL (
        SELECT gs::date AS week_start
        FROM GENERATE_SERIES(
          GREATEST(
            DATE_TRUNC('week', sfr.sale_month + INTERVAL '1 day')::date,
            (DATE_TRUNC('week', CURRENT_DATE) + INTERVAL '7 days')::date
          ),
          (sfr.sale_month + INTERVAL '1 month - 1 day')::date,
          INTERVAL '1 week'
        ) gs
        WHERE gs >= sfr.sale_month
      ) weeks ON true) sw
  cross join lateral (values (sw.sold_p25), (sw.sold_p50), (sw.sold_p75)) o(d)
  join (values ('VA', 1.0), ('OH', 0.5), ('OH', 0.5), ('PA', 1.0), ('MI', 1.0), ('IL', 1.0), ('CA', 1.0), ('FL', 1.0),
    ('CO', 1.0), ('WA', 1.0), ('TX', 1.0), ('OR', 1.0), ('UT', 1.0)) wm(state_abbr, w) on wm.state_abbr = sw.state_abbr  -- Ohio splits over two warehouses
) f
where f.predicted_date::date between :start_date and :end_date

Pitfalls:

  • A forecast as of today: every load recomputes it from today's date, so a future month's figure moves daily. Past months hold only actual installs.
  • Lumen counts every project; QuickSight's sheet keeps only projects its Lumio join marks non-liability (is_lumio_non_liability = 0), so its totals run lower (Brendan accepted the gap, 2026-11-06).
  • Package price (main contract OSC 28) times the row's units, so a pipeline job counts at its discounted share; a forecasted sale is $30,607.03 a unit. The Executive Dashboard's Installed Package Price counts installs at full price (Conflict 36).

Static Install Forecast

Install Forecast Install Forecast: Installs by Month, Actual and Forecast (Static Forecast line) · target none (it is the plan)

Also called: Static Forecast; static_forecast

Definition: QuickSight's fixed plan of installs per month for 2026 and 2027, drawn against the forecast.

SQL
select month, value
from (values 
    (date '2026-01-01', 131), (date '2026-02-01', 102), (date '2026-03-01', 128), (date '2026-04-01', 129), (date '2026-05-01', 179), (date '2026-06-01', 228), 
    (date '2026-07-01', 261), (date '2026-08-01', 304), (date '2026-09-01', 367), (date '2026-10-01', 345), (date '2026-11-01', 277), (date '2026-12-01', 196), 
    (date '2027-01-01', 131), (date '2027-02-01', 100), (date '2027-03-01', 78), (date '2027-04-01', 87), (date '2027-05-01', 121), (date '2027-06-01', 226), 
    (date '2027-07-01', 331), (date '2027-08-01', 439), (date '2027-09-01', 489), (date '2027-10-01', 410), (date '2027-11-01', 322), (date '2027-12-01', 215)
  ) t(month, value)  -- a fixed plan, not in Albatross
where month between date_trunc('month', :start_date::date) and :end_date
order by month

Pitfalls:

  • A hard-coded table copied from QuickSight's calculated field, not read from Albatross: it never changes with the data.
  • 0 outside 2026 and 2027.

Install Crew Monthly Capacity

Install Forecast By State: Ohio, Virginia, Other States and Pennsylvania Installs vs Capacity (the Capacity line) · target none

Also called: Capacity; Monthly Capacity; crew capacity

Definition: How many installs a state's crews can do in a month: active install crews × 14, times the state's weather factor for the month.

SQL
select c.state_abbr, c.crews, coalesce(wf.weather_factor, 0.80) as weather_factor,
  round(c.crews * 14 * coalesce(wf.weather_factor, 0.80)) as value  -- installs a month
from (select o.state_abbr, count(*) as crews
  from (select case o.id when 158 then 'IL' when 163 then 'MD' when 157 then 'MI' when 159 then 'MI'
        when 168 then 'WA' when 161 then 'CA' when 591 then 'VA' when 596 then 'VA' when 587 then 'OH'
        else upper(left(trim(regexp_replace(o.organization_name, '^\([^)]+\)\s*', '')), 2)) end as state_abbr
      from phoenix.organization o
      join phoenix.object_status os on os.id = o.object_status_id
      join phoenix.base_status bs on bs.id = os.base_status_id
      where ((o.object_type_id = 17 and o.id not in (33, 80, 97, 103, 146, 175, 176, 179, 203, 525, 526, 528))
          or o.object_type_id = 21)
        and o.archived = false and bs.base_status = 'ACTIVE') o
  where o.state_abbr in ('IL', 'MD', 'MI', 'WA', 'CA', 'OH', 'VA', 'PA', 'FL', 'CO', 'TX', 'SC', 'OR', 'UT')
  group by o.state_abbr) c
left join (values 
    ('OH', 1, 0.68), ('OH', 2, 0.73), ('OH', 3, 0.73), ('OH', 4, 0.77), ('OH', 5, 0.77), ('OH', 6, 0.82), ('OH', 7, 0.86), ('OH', 8, 0.86), ('OH', 9, 0.82), ('OH', 10, 0.77), ('OH', 11, 0.73), ('OH', 12, 0.68),
    ('VA', 1, 0.75), ('VA', 2, 0.75), ('VA', 3, 0.70), ('VA', 4, 0.75), ('VA', 5, 0.75), ('VA', 6, 0.75), ('VA', 7, 0.70), ('VA', 8, 0.75), ('VA', 9, 0.82), ('VA', 10, 0.82), ('VA', 11, 0.77), ('VA', 12, 0.75),
    ('PA', 1, 0.68), ('PA', 2, 0.73), ('PA', 3, 0.73), ('PA', 4, 0.77), ('PA', 5, 0.77), ('PA', 6, 0.82), ('PA', 7, 0.86), ('PA', 8, 0.86), ('PA', 9, 0.82), ('PA', 10, 0.77), ('PA', 11, 0.73), ('PA', 12, 0.68),
    ('MI', 1, 0.64), ('MI', 2, 0.68), ('MI', 3, 0.73), ('MI', 4, 0.77), ('MI', 5, 0.82), ('MI', 6, 0.86), ('MI', 7, 0.86), ('MI', 8, 0.86), ('MI', 9, 0.82), ('MI', 10, 0.77), ('MI', 11, 0.68), ('MI', 12, 0.64),
    ('IL', 1, 0.73), ('IL', 2, 0.77), ('IL', 3, 0.73), ('IL', 4, 0.77), ('IL', 5, 0.77), ('IL', 6, 0.82), ('IL', 7, 0.86), ('IL', 8, 0.91), ('IL', 9, 0.91), ('IL', 10, 0.86), ('IL', 11, 0.77), ('IL', 12, 0.73),
    ('CA', 1, 0.86), ('CA', 2, 0.86), ('CA', 3, 0.91), ('CA', 4, 0.95), ('CA', 5, 0.98), ('CA', 6, 1.00), ('CA', 7, 1.00), ('CA', 8, 1.00), ('CA', 9, 0.98), ('CA', 10, 0.95), ('CA', 11, 0.91), ('CA', 12, 0.86),
    ('FL', 1, 0.82), ('FL', 2, 0.82), ('FL', 3, 0.82), ('FL', 4, 0.86), ('FL', 5, 0.73), ('FL', 6, 0.59), ('FL', 7, 0.55), ('FL', 8, 0.55), ('FL', 9, 0.64), ('FL', 10, 0.77), ('FL', 11, 0.86), ('FL', 12, 0.86),
    ('CO', 1, 0.86), ('CO', 2, 0.86), ('CO', 3, 0.82), ('CO', 4, 0.77), ('CO', 5, 0.73), ('CO', 6, 0.77), ('CO', 7, 0.73), ('CO', 8, 0.77), ('CO', 9, 0.86), ('CO', 10, 0.91), ('CO', 11, 0.91), ('CO', 12, 0.91)
  ) wf(state_abbr, month_num, weather_factor)
  on wf.state_abbr = c.state_abbr and wf.month_num = extract(month from :start_date::date)  -- the month shown
order by c.state_abbr

Pitfalls:

  • Crews are counted today from the organization records (active Installer organizations, type 17 less a dozen office records, plus type 21), filed by state from the first two letters of the name; past months use today's crews too.
  • Weather factors run 0.55 (Florida in summer) to 1.00 (California); states with none (Texas, Utah, Maryland and the rest) use 0.80.
  • The line only appears in a month where the state has forecast rows. Other States takes the largest single state's capacity in the month, not their total. Pennsylvania's line averages its rows where the others take the maximum, which changes nothing: every row of a state and month carries the same capacity.
  • Not the Weekly KPI Report's Completed Installs per Crew target of 2.4 a week (about 10 a month): this assumes 14.

Remaining Install Capacity

Install Forecast By State: Remaining Capacity pivot (state by predicted month) · target 0 or more

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: Remaining Capacity

Definition: Each state's Install Crew Monthly Capacity less its forecasted installs (actual and expected) in the month; below zero, the month is over capacity.

SQL
select f.state_abbr, date_trunc('month', f.predicted_date)::date as month,
  round(c.crews * 14 * coalesce(wf.weather_factor, 0.80)) as capacity, round(sum(f.unit_count), 1) as units,
  round(c.crews * 14 * coalesce(wf.weather_factor, 0.80)) - sum(f.unit_count) as value
from (
  -- 1. actuals: install verified (OSC 671) since 2026, every project type, 1 unit each
  select p.osc_671::date as predicted_date, s.abbreviation as state_abbr, 'Actual' as tier, 1.0 as unit_count,
    round(coalesce(ac.osc_28::numeric, 0), 2) as weighted_package_price, ac.osc_35::numeric as system_size_kw
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  left join data_map_1.dm_pb_3_data ac on ac.project_id = p.project_id and ac.main = true and ac.archived = false
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_671 >= '2026-01-01'
  union all
  -- 2. the pipeline: each active project, spread over its scenarios
  select b.d, pb.state_abbr, pb.tier, b.u, round(coalesce(pb.package_price::numeric, 0) * b.u, 2), pb.system_size_kw::numeric
  from (select p.project_id, s.abbreviation as state_abbr, c.osc_28 as package_price, c.osc_35 as system_size_kw,
      se.scheduled_install_date, se.slippage_applies,
      case
        when se.scheduled_install_date is not null then 'S'
        when piv.project_id is not null then 'P'
        when ws.project_id is not null then 'W'
        when p.osc_667 is not null and sh.project_id is null then 'R'
        when p.osc_667 is not null and sh.estimated_rts_date is not null then 'H'
        when p.osc_666 is not null then 'A'
        when epd.expected_permit_date is not null then 'E'
        when p.osc_663 is not null then 'F'
        when p.osc_662 is not null then 'L'
        when p.osc_687 is not null then 'D'
        when p.osc_660 is not null then 'X'
      end as tier,
      case
        when se.scheduled_install_date is not null or piv.project_id is not null or ws.project_id is not null or p.osc_667 is not null then 1.00
        when p.osc_666 is not null or epd.expected_permit_date is not null then 0.95
        when p.osc_663 is not null or p.osc_662 is not null then 0.90
        else 0.80
      end as retention_factor,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then null
        when ws.project_id is not null then ws.work_started_date
        when p.osc_667 is not null and sh.project_id is null then p.osc_667
        when p.osc_667 is not null and sh.estimated_rts_date is not null then sh.estimated_rts_date
        when p.osc_666 is not null then p.osc_666
        when epd.expected_permit_date is not null then epd.expected_permit_date
        when p.osc_663 is not null then p.osc_663
        when p.osc_662 is not null then p.osc_662
        when p.osc_687 is not null then p.osc_687
        when p.osc_660 is not null then p.osc_660
      end as milestone_date,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 0
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p25
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p25
        when p.osc_663 is not null then sm.permit_p25
        when p.osc_662 is not null then sm.plan_set_p25
        when p.osc_687 is not null then sm.deal_review_p25
        else sm.sold_p25
      end as tier_p25,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 0
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p50
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p50
        when p.osc_663 is not null then sm.permit_p50
        when p.osc_662 is not null then sm.plan_set_p50
        when p.osc_687 is not null then sm.deal_review_p50
        else sm.sold_p50
      end as tier_p50,
      case
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 5
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p75
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p75
        when p.osc_663 is not null then sm.permit_p75
        when p.osc_662 is not null then sm.plan_set_p75
        when p.osc_687 is not null then sm.deal_review_p75
        else sm.sold_p75
      end as tier_p75
    from data_map_1.dm_project_data p
    join phoenix.state s on s.id = p.state_id
    join phoenix.object_status os on os.id = p.object_status_id
    join phoenix.base_status bs on bs.id = os.base_status_id
    join (select s.abbreviation as state,
        case when count(d.rts) >= 30 then percentile_cont(0.25) within group (order by d.rts) else 11 end::int as rts_p25,
        case when count(d.rts) >= 30 then percentile_cont(0.50) within group (order by d.rts) else 22 end::int as rts_p50,
        case when count(d.rts) >= 30 then percentile_cont(0.75) within group (order by d.rts) else 44 end::int as rts_p75,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.25) within group (order by d.permits_approved) else 19 end::int as permits_approved_p25,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.50) within group (order by d.permits_approved) else 33 end::int as permits_approved_p50,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.75) within group (order by d.permits_approved) else 63 end::int as permits_approved_p75,
        case when count(d.permit) >= 30 then percentile_cont(0.25) within group (order by d.permit) else 32 end::int as permit_p25,
        case when count(d.permit) >= 30 then percentile_cont(0.50) within group (order by d.permit) else 59 end::int as permit_p50,
        case when count(d.permit) >= 30 then percentile_cont(0.75) within group (order by d.permit) else 85 end::int as permit_p75,
        case when count(d.plan_set) >= 30 then percentile_cont(0.25) within group (order by d.plan_set) else 43 end::int as plan_set_p25,
        case when count(d.plan_set) >= 30 then percentile_cont(0.50) within group (order by d.plan_set) else 68 end::int as plan_set_p50,
        case when count(d.plan_set) >= 30 then percentile_cont(0.75) within group (order by d.plan_set) else 100 end::int as plan_set_p75,
        case when count(d.deal_review) >= 30 then percentile_cont(0.25) within group (order by d.deal_review) else 42 end::int as deal_review_p25,
        case when count(d.deal_review) >= 30 then percentile_cont(0.50) within group (order by d.deal_review) else 67 end::int as deal_review_p50,
        case when count(d.deal_review) >= 30 then percentile_cont(0.75) within group (order by d.deal_review) else 95 end::int as deal_review_p75,
        case when count(d.sold) >= 30 then percentile_cont(0.25) within group (order by d.sold) else 55 end::int as sold_p25,
        case when count(d.sold) >= 30 then percentile_cont(0.50) within group (order by d.sold) else 83 end::int as sold_p50,
        case when count(d.sold) >= 30 then percentile_cont(0.75) within group (order by d.sold) else 115 end::int as sold_p75
      from data_map_1.dm_project_data p
      join phoenix.state s on s.id = p.state_id
      cross join lateral (select case when p.osc_671 - p.osc_667 > 0 then p.osc_671 - p.osc_667 end as rts,
          case when p.osc_671 - p.osc_666 > 0 then p.osc_671 - p.osc_666 end as permits_approved,
          case when p.osc_671 - p.osc_663 > 0 then p.osc_671 - p.osc_663 end as permit,
          case when p.osc_671 - p.osc_662 > 0 then p.osc_671 - p.osc_662 end as plan_set,
          case when p.osc_671 - p.osc_687 > 0 then p.osc_671 - p.osc_687 end as deal_review,
          case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
      where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
        and p.osc_660 >= '2025-01-01' and s.abbreviation != 'PA'
      group by s.abbreviation
      union all
      -- Pennsylvania: its own projects, every year, no 30-project minimum
      select 'PA',
        percentile_cont(0.25) within group (order by d.rts)::int,
        percentile_cont(0.50) within group (order by d.rts)::int,
        percentile_cont(0.75) within group (order by d.rts)::int,
        percentile_cont(0.25) within group (order by d.permits_approved)::int,
        percentile_cont(0.50) within group (order by d.permits_approved)::int,
        percentile_cont(0.75) within group (order by d.permits_approved)::int,
        percentile_cont(0.25) within group (order by d.permit)::int,
        percentile_cont(0.50) within group (order by d.permit)::int,
        percentile_cont(0.75) within group (order by d.permit)::int,
        percentile_cont(0.25) within group (order by d.plan_set)::int,
        percentile_cont(0.50) within group (order by d.plan_set)::int,
        percentile_cont(0.75) within group (order by d.plan_set)::int,
        percentile_cont(0.25) within group (order by d.deal_review)::int,
        percentile_cont(0.50) within group (order by d.deal_review)::int,
        percentile_cont(0.75) within group (order by d.deal_review)::int,
        percentile_cont(0.25) within group (order by d.sold)::int,
        percentile_cont(0.50) within group (order by d.sold)::int,
        percentile_cont(0.75) within group (order by d.sold)::int
      from data_map_1.dm_project_data p
      join phoenix.state s on s.id = p.state_id
      cross join lateral (select case when p.osc_671 - p.osc_667 > 0 then p.osc_671 - p.osc_667 end as rts,
          case when p.osc_671 - p.osc_666 > 0 then p.osc_671 - p.osc_666 end as permits_approved,
          case when p.osc_671 - p.osc_663 > 0 then p.osc_671 - p.osc_663 end as permit,
          case when p.osc_671 - p.osc_662 > 0 then p.osc_671 - p.osc_662 end as plan_set,
          case when p.osc_671 - p.osc_687 > 0 then p.osc_671 - p.osc_687 end as deal_review,
          case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
      where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0 and s.abbreviation = 'PA') sm on sm.state = s.abbreviation
    left join (SELECT DISTINCT ON (combined.project_id)
        combined.project_id,
        combined.scheduled_start_date,
        combined.scheduled_install_date,
        combined.event_status,
        combined.slippage_applies
      FROM (
        SELECT
          ev.project_id,
          ev.start_time::date AS scheduled_start_date,
          ev.end_time::date AS scheduled_install_date,
          ev_os.object_status AS event_status,
          (ev.osc_824::varchar LIKE '%426%' OR ev.osc_824::varchar LIKE '%427%') AS slippage_applies,
          ev.end_time AS sort_date
        FROM data_map_1.dm_ev_41_data ev
        JOIN phoenix.object_status ev_os ON ev_os.id = ev.object_status_id
        JOIN phoenix.base_status ev_bs ON ev_bs.id = ev_os.base_status_id
        WHERE ev.archived = false
          AND ev.start_time IS NOT NULL
          AND ev.end_time IS NOT NULL
          AND ev.end_time >= CURRENT_DATE
          AND ev_bs.base_status NOT IN ('COMPLETE', 'CANCELED')
        UNION ALL
        SELECT
          ev.project_id,
          ev.start_time::date AS scheduled_start_date,
          ev.end_time::date AS scheduled_install_date,
          ev_os.object_status AS event_status,
          FALSE AS slippage_applies,
          ev.end_time AS sort_date
        FROM data_map_1.dm_ev_43_data ev
        JOIN phoenix.object_status ev_os ON ev_os.id = ev.object_status_id
        JOIN phoenix.base_status ev_bs ON ev_bs.id = ev_os.base_status_id
        WHERE ev.archived = false
          AND ev.end_time IS NOT NULL
          AND ev.end_time >= CURRENT_DATE
          AND ev_bs.base_status NOT IN ('COMPLETE', 'CANCELED')
      ) combined
      ORDER BY combined.project_id, combined.sort_date DESC) se on se.project_id = p.project_id
    left join (SELECT DISTINCT p.project_id
      FROM data_map_1.dm_project_data p
      JOIN phoenix.object_status os ON os.id = p.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      JOIN (
        SELECT project_id, MAX(end_time::date) AS latest_completed_appt
        FROM (
          SELECT project_id, end_time
          FROM data_map_1.dm_ev_41_data ev
          JOIN phoenix.object_status os2 ON os2.id = ev.object_status_id
          JOIN phoenix.base_status bs2 ON bs2.id = os2.base_status_id
          WHERE ev.archived = false AND ev.end_time IS NOT NULL
            AND bs2.base_status = 'COMPLETE'
          UNION ALL
          SELECT project_id, end_time
          FROM data_map_1.dm_ev_43_data ev
          JOIN phoenix.object_status os2 ON os2.id = ev.object_status_id
          JOIN phoenix.base_status bs2 ON bs2.id = os2.base_status_id
          WHERE ev.archived = false AND ev.end_time IS NOT NULL
            AND bs2.base_status = 'COMPLETE'
        ) completed_events
        GROUP BY project_id
      ) recent ON recent.project_id = p.project_id
        AND recent.latest_completed_appt >= CURRENT_DATE - INTERVAL '3 days'
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_671 IS NULL
        AND bs.base_status NOT IN ('COMPLETE','CANCELED')) piv on piv.project_id = p.project_id
    left join (SELECT
        p.project_id,
        p.osc_669::date AS work_started_date
      FROM data_map_1.dm_project_data p
      JOIN phoenix.object_status os ON os.id = p.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_669 IS NOT NULL
        AND p.osc_671 IS NULL
        AND bs.base_status NOT IN ('COMPLETE', 'CANCELED')
        AND (CURRENT_DATE - p.osc_669::date) <= 30) ws on ws.project_id = p.project_id
    left join (SELECT
        project_id,
        osc_1176::date AS estimated_rts_date
      FROM data_map_1.dm_pb_11_data
      WHERE osc_633 IS NOT NULL
        AND osc_635 IS NULL) sh on sh.project_id = p.project_id
    left join (SELECT DISTINCT ON (ev.project_id)
        ev.project_id,
        ev.osc_511::date AS expected_permit_date
      FROM data_map_1.dm_ev_40_data ev
      JOIN phoenix.object_status os ON os.id = ev.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      WHERE ev.archived = false
        AND ev.osc_511 IS NOT NULL
        AND ev.osc_511::date >= CURRENT_DATE
        AND bs.base_status NOT IN ('COMPLETE', 'CANCELED')
      ORDER BY ev.project_id, ev.start_time DESC) epd on epd.project_id = p.project_id
    left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true and c.archived = false
    left join phoenix.record r on r.id = c.osc_849
    where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
      and bs.base_status not in ('COMPLETE', 'CANCELED')
      and p.osc_671 is null
      and coalesce(r.record_name, '') not ilike '%mosaic%'
      and coalesce(r.record_name, '') not ilike '%sunnova%'
      and p.object_status_id not in (58, 206, 83, 63)  -- Retention and other excluded statuses
      and p.object_type_id != 7  -- not Roof / R&R
      and p.project_id not in (select project_id from data_map_1.dm_pb_20_data where object_status_id in (84, 207, 86))  -- compliance
      and p.osc_676 is null) pb
  cross join lateral (
    -- scheduled: the appointment day, a Standard Install 60% there and 40% a week later
    select (pb.scheduled_install_date + o.d * interval '1 day')::date as d, o.w * pb.retention_factor as u
    from (values (0, 0.6, true), (7, 0.4, true), (0, 1.0, false)) o(d, w, slip)
    where pb.scheduled_install_date is not null and o.slip = coalesce(pb.slippage_applies, false)
    union all
    -- pending IV: today, 1 unit
    select current_date, 1.0 where pb.tier = 'P'
    union all
    -- everything else: milestone + P25/P50/P75 days (never before today), thirds; halves on P25/P50 once overdue
    select greatest((pb.milestone_date + o.d * interval '1 day')::date, (current_date + o.d * interval '1 day')::date),
      case when (pb.milestone_date + pb.tier_p50 * interval '1 day')::date < current_date then 0.5 else round(1.0 / 3.0, 4) end * pb.retention_factor
    from unnest(case when (pb.milestone_date + pb.tier_p50 * interval '1 day')::date < current_date then array[pb.tier_p25, pb.tier_p50]
      else array[pb.tier_p25, pb.tier_p50, pb.tier_p75] end) o(d)
    where pb.scheduled_install_date is null and pb.milestone_date is not null and pb.tier != 'P'
  ) b
  union all
  -- 3. forecasted sales: future weeks' sales target x 58%, a third on each scenario, $30,607.03 and 8.877 kW apiece
  select (sw.week_start + o.d * interval '1 day')::date, sw.state_abbr, 'Forecasted Sale', round(sw.weekly_units / 3.0 * wm.w, 4),
    round(30607.03 * (sw.weekly_units / 3.0 * wm.w), 2), 8.877
  from (SELECT
        sfr.state_abbr, weeks.week_start, sfr.sale_month,
        CASE
          WHEN ROW_NUMBER() OVER (PARTITION BY sfr.state_abbr, sfr.sale_month ORDER BY weeks.week_start) = 1
            THEN FLOOR(sfr.forecast_units * 0.58) - (FLOOR(FLOOR(sfr.forecast_units * 0.58)::numeric / COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month)) * (COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month) - 1))::int
          ELSE FLOOR(FLOOR(sfr.forecast_units * 0.58)::numeric / COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month))::int
        END AS weekly_units,
        sm.sold_p25, sm.sold_p50, sm.sold_p75
      FROM (SELECT *
      FROM (VALUES
        ('VA','2026-12-01'::date,75),('VA','2027-02-01'::date,65),('VA','2027-03-01'::date,115),('VA','2027-04-01'::date,260),('VA','2027-05-01'::date,395),('VA','2027-06-01'::date,435),('VA','2027-07-01'::date,510),('VA','2027-08-01'::date,410),('VA','2027-09-01'::date,150),('VA','2027-10-01'::date,100),('VA','2027-11-01'::date,100),('VA','2027-12-01'::date,35),('OH','2026-12-01'::date,95),('OH','2027-01-01'::date,50),('OH','2027-02-01'::date,95),('OH','2027-03-01'::date,125),('OH','2027-04-01'::date,220),('OH','2027-05-01'::date,370),('OH','2027-06-01'::date,370),('OH','2027-07-01'::date,370),('OH','2027-08-01'::date,360),('OH','2027-09-01'::date,200),('OH','2027-10-01'::date,150),('OH','2027-11-01'::date,135),('OH','2027-12-01'::date,100)) AS t(state_abbr, sale_month, forecast_units)
      WHERE forecast_units > 0
        AND sale_month >= DATE_TRUNC('month', CURRENT_DATE)) sfr JOIN (select s.abbreviation as state,
    case when count(d.sold) >= 30 then percentile_cont(0.25) within group (order by d.sold) else 55 end::int as sold_p25,
    case when count(d.sold) >= 30 then percentile_cont(0.50) within group (order by d.sold) else 83 end::int as sold_p50,
    case when count(d.sold) >= 30 then percentile_cont(0.75) within group (order by d.sold) else 115 end::int as sold_p75
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  cross join lateral (select case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_660 >= '2025-01-01' and s.abbreviation != 'PA'
  group by s.abbreviation
  union all
  -- Pennsylvania: its own projects, every year, no 30-project minimum
  select 'PA',
    percentile_cont(0.25) within group (order by d.sold)::int,
    percentile_cont(0.50) within group (order by d.sold)::int,
    percentile_cont(0.75) within group (order by d.sold)::int
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  cross join lateral (select case when p.osc_671 - p.osc_660 > 0 then p.osc_671 - p.osc_660 end as sold) d
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0 and s.abbreviation = 'PA') sm ON sm.state = sfr.state_abbr
      JOIN LATERAL (
        SELECT gs::date AS week_start
        FROM GENERATE_SERIES(
          GREATEST(
            DATE_TRUNC('week', sfr.sale_month + INTERVAL '1 day')::date,
            (DATE_TRUNC('week', CURRENT_DATE) + INTERVAL '7 days')::date
          ),
          (sfr.sale_month + INTERVAL '1 month - 1 day')::date,
          INTERVAL '1 week'
        ) gs
        WHERE gs >= sfr.sale_month
      ) weeks ON true) sw
  cross join lateral (values (sw.sold_p25), (sw.sold_p50), (sw.sold_p75)) o(d)
  join (values ('VA', 1.0), ('OH', 0.5), ('OH', 0.5), ('PA', 1.0), ('MI', 1.0), ('IL', 1.0), ('CA', 1.0), ('FL', 1.0),
    ('CO', 1.0), ('WA', 1.0), ('TX', 1.0), ('OR', 1.0), ('UT', 1.0)) wm(state_abbr, w) on wm.state_abbr = sw.state_abbr  -- Ohio splits over two warehouses
) f
left join (select o.state_abbr, count(*) as crews from (select case o.id when 158 then 'IL' when 163 then 'MD' when 157 then 'MI' when 159 then 'MI'
        when 168 then 'WA' when 161 then 'CA' when 591 then 'VA' when 596 then 'VA' when 587 then 'OH'
        else upper(left(trim(regexp_replace(o.organization_name, '^\([^)]+\)\s*', '')), 2)) end as state_abbr
      from phoenix.organization o
      join phoenix.object_status os on os.id = o.object_status_id
      join phoenix.base_status bs on bs.id = os.base_status_id
      where ((o.object_type_id = 17 and o.id not in (33, 80, 97, 103, 146, 175, 176, 179, 203, 525, 526, 528))
          or o.object_type_id = 21)
        and o.archived = false and bs.base_status = 'ACTIVE') o
  where o.state_abbr in ('IL', 'MD', 'MI', 'WA', 'CA', 'OH', 'VA', 'PA', 'FL', 'CO', 'TX', 'SC', 'OR', 'UT') group by o.state_abbr) c on c.state_abbr = f.state_abbr
left join (values 
    ('OH', 1, 0.68), ('OH', 2, 0.73), ('OH', 3, 0.73), ('OH', 4, 0.77), ('OH', 5, 0.77), ('OH', 6, 0.82), ('OH', 7, 0.86), ('OH', 8, 0.86), ('OH', 9, 0.82), ('OH', 10, 0.77), ('OH', 11, 0.73), ('OH', 12, 0.68),
    ('VA', 1, 0.75), ('VA', 2, 0.75), ('VA', 3, 0.70), ('VA', 4, 0.75), ('VA', 5, 0.75), ('VA', 6, 0.75), ('VA', 7, 0.70), ('VA', 8, 0.75), ('VA', 9, 0.82), ('VA', 10, 0.82), ('VA', 11, 0.77), ('VA', 12, 0.75),
    ('PA', 1, 0.68), ('PA', 2, 0.73), ('PA', 3, 0.73), ('PA', 4, 0.77), ('PA', 5, 0.77), ('PA', 6, 0.82), ('PA', 7, 0.86), ('PA', 8, 0.86), ('PA', 9, 0.82), ('PA', 10, 0.77), ('PA', 11, 0.73), ('PA', 12, 0.68),
    ('MI', 1, 0.64), ('MI', 2, 0.68), ('MI', 3, 0.73), ('MI', 4, 0.77), ('MI', 5, 0.82), ('MI', 6, 0.86), ('MI', 7, 0.86), ('MI', 8, 0.86), ('MI', 9, 0.82), ('MI', 10, 0.77), ('MI', 11, 0.68), ('MI', 12, 0.64),
    ('IL', 1, 0.73), ('IL', 2, 0.77), ('IL', 3, 0.73), ('IL', 4, 0.77), ('IL', 5, 0.77), ('IL', 6, 0.82), ('IL', 7, 0.86), ('IL', 8, 0.91), ('IL', 9, 0.91), ('IL', 10, 0.86), ('IL', 11, 0.77), ('IL', 12, 0.73),
    ('CA', 1, 0.86), ('CA', 2, 0.86), ('CA', 3, 0.91), ('CA', 4, 0.95), ('CA', 5, 0.98), ('CA', 6, 1.00), ('CA', 7, 1.00), ('CA', 8, 1.00), ('CA', 9, 0.98), ('CA', 10, 0.95), ('CA', 11, 0.91), ('CA', 12, 0.86),
    ('FL', 1, 0.82), ('FL', 2, 0.82), ('FL', 3, 0.82), ('FL', 4, 0.86), ('FL', 5, 0.73), ('FL', 6, 0.59), ('FL', 7, 0.55), ('FL', 8, 0.55), ('FL', 9, 0.64), ('FL', 10, 0.77), ('FL', 11, 0.86), ('FL', 12, 0.86),
    ('CO', 1, 0.86), ('CO', 2, 0.86), ('CO', 3, 0.82), ('CO', 4, 0.77), ('CO', 5, 0.73), ('CO', 6, 0.77), ('CO', 7, 0.73), ('CO', 8, 0.77), ('CO', 9, 0.86), ('CO', 10, 0.91), ('CO', 11, 0.91), ('CO', 12, 0.91)
  ) wf(state_abbr, month_num, weather_factor)
  on wf.state_abbr = f.state_abbr and wf.month_num = extract(month from f.predicted_date)
where f.predicted_date::date between :start_date and :end_date
group by 1, 2, c.crews, wf.weather_factor
order by 1, 2

Pitfalls:

  • A forecast as of today: every load recomputes it from today's date, so a future month's figure moves daily. Past months hold only actual installs.
  • Lumen counts every project; QuickSight's sheet keeps only projects its Lumio join marks non-liability (is_lumio_non_liability = 0), so its totals run lower (Brendan accepted the gap, 2026-11-06).
  • Per state only: a total across states would need each state's capacity summed, which the pivot doesn't do.
  • Empty for a state with no crews on record (its capacity is blank), however many installs it expects.
  • On 2026-12-02 Ohio's December read 67 capacity against about 107 units (4 actual, 103 expected).

Forecasted M1 Approvals

Install Forecast M1 Forecast: M1 Approvals by Month, Actual and Forecast (columns) · target none

Sale dates: Submitted (OSC 660) and Closed (OSC 687). Where this treats OSC 660 as the sale, it is counting submissions to Albatross, not sales. See Sale dates.

Also called: M1 Forecast; M1 Approvals

Definition: M1 approvals done plus M1 approvals expected, by predicted M1 date: actual approvals, the active pipeline (including installed jobs waiting on M1) spread over its likely approval dates, and forecasted sales.

SQL
select round(sum(f.unit_count), 1) as value
from (
  -- 1. actuals: M1 approved (OSC 682) since 2026, every project type, 1 unit each
  select p.osc_682::date as predicted_date, s.abbreviation as state_abbr, 'Actual' as tier, 1.0 as unit_count,
    round(coalesce(ac.osc_28::numeric, 0), 2) as weighted_package_price, ac.osc_35::numeric as system_size_kw
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  left join data_map_1.dm_pb_3_data ac on ac.project_id = p.project_id and ac.main = true and ac.archived = false
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_682 >= '2026-01-01'
  union all
  -- 2. the pipeline: each active project, spread over its scenarios
  select b.d, pb.state_abbr, pb.tier, b.u, round(coalesce(pb.package_price::numeric, 0) * b.u, 2), pb.system_size_kw::numeric
  from (select p.project_id, s.abbreviation as state_abbr, c.osc_28 as package_price, c.osc_35 as system_size_kw,
      se.scheduled_install_date, se.slippage_applies,
      case
        when ivc.project_id is not null then 'IV'
        when se.scheduled_install_date is not null then 'S'
        when piv.project_id is not null then 'P'
        when ws.project_id is not null then 'W'
        when p.osc_667 is not null and sh.project_id is null then 'R'
        when p.osc_667 is not null and sh.estimated_rts_date is not null then 'H'
        when p.osc_666 is not null then 'A'
        when epd.expected_permit_date is not null then 'E'
        when p.osc_663 is not null then 'F'
        when p.osc_662 is not null then 'L'
        when p.osc_687 is not null then 'D'
        when p.osc_660 is not null then 'X'
      end as tier,
      case
        when se.scheduled_install_date is not null or piv.project_id is not null or ws.project_id is not null or p.osc_667 is not null then 1.00
        when p.osc_666 is not null or epd.expected_permit_date is not null then 0.95
        when p.osc_663 is not null or p.osc_662 is not null then 0.90
        else 0.80
      end as retention_factor,
      case
        when ivc.project_id is not null then ivc.iv_date
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then null
        when ws.project_id is not null then ws.work_started_date
        when p.osc_667 is not null and sh.project_id is null then p.osc_667
        when p.osc_667 is not null and sh.estimated_rts_date is not null then sh.estimated_rts_date
        when p.osc_666 is not null then p.osc_666
        when epd.expected_permit_date is not null then epd.expected_permit_date
        when p.osc_663 is not null then p.osc_663
        when p.osc_662 is not null then p.osc_662
        when p.osc_687 is not null then p.osc_687
        when p.osc_660 is not null then p.osc_660
      end as milestone_date,
      case
        when ivc.project_id is not null then coalesce(mm.m1_p25, case when coalesce(mms.n, 0) >= 30 then mms.m1_p25 else mmn.m1_p25 end)
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 0
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p25
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p25
        when p.osc_663 is not null then sm.permit_p25
        when p.osc_662 is not null then sm.plan_set_p25
        when p.osc_687 is not null then sm.deal_review_p25
        else sm.sold_p25
      end as tier_p25,
      case
        when ivc.project_id is not null then coalesce(mm.m1_p50, case when coalesce(mms.n, 0) >= 30 then mms.m1_p50 else mmn.m1_p50 end)
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 0
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p50
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p50
        when p.osc_663 is not null then sm.permit_p50
        when p.osc_662 is not null then sm.plan_set_p50
        when p.osc_687 is not null then sm.deal_review_p50
        else sm.sold_p50
      end as tier_p50,
      case
        when ivc.project_id is not null then coalesce(mm.m1_p75, case when coalesce(mms.n, 0) >= 30 then mms.m1_p75 else mmn.m1_p75 end)
        when se.scheduled_install_date is not null then null
        when piv.project_id is not null then 0
        when ws.project_id is not null then 5
        when p.osc_667 is not null and (sh.project_id is null or sh.estimated_rts_date is not null) then sm.rts_p75
        when p.osc_666 is not null or epd.expected_permit_date is not null then sm.permits_approved_p75
        when p.osc_663 is not null then sm.permit_p75
        when p.osc_662 is not null then sm.plan_set_p75
        when p.osc_687 is not null then sm.deal_review_p75
        else sm.sold_p75
      end as tier_p75
    from data_map_1.dm_project_data p
    join phoenix.state s on s.id = p.state_id
    join phoenix.object_status os on os.id = p.object_status_id
    join phoenix.base_status bs on bs.id = os.base_status_id
    join (select s.abbreviation as state,
        case when count(d.rts) >= 30 then percentile_cont(0.25) within group (order by d.rts) else 76 end::int as rts_p25,
        case when count(d.rts) >= 30 then percentile_cont(0.50) within group (order by d.rts) else 87 end::int as rts_p50,
        case when count(d.rts) >= 30 then percentile_cont(0.75) within group (order by d.rts) else 109 end::int as rts_p75,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.25) within group (order by d.permits_approved) else 84 end::int as permits_approved_p25,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.50) within group (order by d.permits_approved) else 98 end::int as permits_approved_p50,
        case when count(d.permits_approved) >= 30 then percentile_cont(0.75) within group (order by d.permits_approved) else 128 end::int as permits_approved_p75,
        case when count(d.permit) >= 30 then percentile_cont(0.25) within group (order by d.permit) else 97 end::int as permit_p25,
        case when count(d.permit) >= 30 then percentile_cont(0.50) within group (order by d.permit) else 124 end::int as permit_p50,
        case when count(d.permit) >= 30 then percentile_cont(0.75) within group (order by d.permit) else 150 end::int as permit_p75,
        case when count(d.plan_set) >= 30 then percentile_cont(0.25) within group (order by d.plan_set) else 108 end::int as plan_set_p25,
        case when count(d.plan_set) >= 30 then percentile_cont(0.50) within group (order by d.plan_set) else 133 end::int as plan_set_p50,
        case when count(d.plan_set) >= 30 then percentile_cont(0.75) within group (order by d.plan_set) else 165 end::int as plan_set_p75,
        case when count(d.deal_review) >= 30 then percentile_cont(0.25) within group (order by d.deal_review) else 107 end::int as deal_review_p25,
        case when count(d.deal_review) >= 30 then percentile_cont(0.50) within group (order by d.deal_review) else 132 end::int as deal_review_p50,
        case when count(d.deal_review) >= 30 then percentile_cont(0.75) within group (order by d.deal_review) else 160 end::int as deal_review_p75,
        case when count(d.sold) >= 30 then percentile_cont(0.25) within group (order by d.sold) else 120 end::int as sold_p25,
        case when count(d.sold) >= 30 then percentile_cont(0.50) within group (order by d.sold) else 148 end::int as sold_p50,
        case when count(d.sold) >= 30 then percentile_cont(0.75) within group (order by d.sold) else 180 end::int as sold_p75
      from data_map_1.dm_project_data p
      join phoenix.state s on s.id = p.state_id
      cross join lateral (select case when p.osc_682 - p.osc_667 > 0 then p.osc_682 - p.osc_667 end as rts,
          case when p.osc_682 - p.osc_666 > 0 then p.osc_682 - p.osc_666 end as permits_approved,
          case when p.osc_682 - p.osc_663 > 0 then p.osc_682 - p.osc_663 end as permit,
          case when p.osc_682 - p.osc_662 > 0 then p.osc_682 - p.osc_662 end as plan_set,
          case when p.osc_682 - p.osc_687 > 0 then p.osc_682 - p.osc_687 end as deal_review,
          case when p.osc_682 - p.osc_660 > 0 then p.osc_682 - p.osc_660 end as sold) d
      where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
        and p.osc_660 >= '2025-01-01' and s.abbreviation != 'PA'
      group by s.abbreviation
      union all
      -- Pennsylvania: Virginia's projects, every year, no 30-project minimum
      select 'PA',
        percentile_cont(0.25) within group (order by d.rts)::int,
        percentile_cont(0.50) within group (order by d.rts)::int,
        percentile_cont(0.75) within group (order by d.rts)::int,
        percentile_cont(0.25) within group (order by d.permits_approved)::int,
        percentile_cont(0.50) within group (order by d.permits_approved)::int,
        percentile_cont(0.75) within group (order by d.permits_approved)::int,
        percentile_cont(0.25) within group (order by d.permit)::int,
        percentile_cont(0.50) within group (order by d.permit)::int,
        percentile_cont(0.75) within group (order by d.permit)::int,
        percentile_cont(0.25) within group (order by d.plan_set)::int,
        percentile_cont(0.50) within group (order by d.plan_set)::int,
        percentile_cont(0.75) within group (order by d.plan_set)::int,
        percentile_cont(0.25) within group (order by d.deal_review)::int,
        percentile_cont(0.50) within group (order by d.deal_review)::int,
        percentile_cont(0.75) within group (order by d.deal_review)::int,
        percentile_cont(0.25) within group (order by d.sold)::int,
        percentile_cont(0.50) within group (order by d.sold)::int,
        percentile_cont(0.75) within group (order by d.sold)::int
      from data_map_1.dm_project_data p
      join phoenix.state s on s.id = p.state_id
      cross join lateral (select case when p.osc_682 - p.osc_667 > 0 then p.osc_682 - p.osc_667 end as rts,
          case when p.osc_682 - p.osc_666 > 0 then p.osc_682 - p.osc_666 end as permits_approved,
          case when p.osc_682 - p.osc_663 > 0 then p.osc_682 - p.osc_663 end as permit,
          case when p.osc_682 - p.osc_662 > 0 then p.osc_682 - p.osc_662 end as plan_set,
          case when p.osc_682 - p.osc_687 > 0 then p.osc_682 - p.osc_687 end as deal_review,
          case when p.osc_682 - p.osc_660 > 0 then p.osc_682 - p.osc_660 end as sold) d
      where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0 and s.abbreviation = 'VA') sm on sm.state = s.abbreviation
    left join (SELECT DISTINCT ON (combined.project_id)
        combined.project_id,
        combined.scheduled_start_date,
        combined.scheduled_install_date,
        combined.event_status,
        combined.slippage_applies
      FROM (
        SELECT
          ev.project_id,
          ev.start_time::date AS scheduled_start_date,
          ev.end_time::date AS scheduled_install_date,
          ev_os.object_status AS event_status,
          (ev.osc_824::varchar LIKE '%426%' OR ev.osc_824::varchar LIKE '%427%') AS slippage_applies,
          ev.end_time AS sort_date
        FROM data_map_1.dm_ev_41_data ev
        JOIN phoenix.object_status ev_os ON ev_os.id = ev.object_status_id
        JOIN phoenix.base_status ev_bs ON ev_bs.id = ev_os.base_status_id
        WHERE ev.archived = false
          AND ev.start_time IS NOT NULL
          AND ev.end_time IS NOT NULL
          AND ev.end_time >= CURRENT_DATE
          AND ev_bs.base_status NOT IN ('COMPLETE', 'CANCELED')
        UNION ALL
        SELECT
          ev.project_id,
          ev.start_time::date AS scheduled_start_date,
          ev.end_time::date AS scheduled_install_date,
          ev_os.object_status AS event_status,
          FALSE AS slippage_applies,
          ev.end_time AS sort_date
        FROM data_map_1.dm_ev_43_data ev
        JOIN phoenix.object_status ev_os ON ev_os.id = ev.object_status_id
        JOIN phoenix.base_status ev_bs ON ev_bs.id = ev_os.base_status_id
        WHERE ev.archived = false
          AND ev.end_time IS NOT NULL
          AND ev.end_time >= CURRENT_DATE
          AND ev_bs.base_status NOT IN ('COMPLETE', 'CANCELED')
      ) combined
      ORDER BY combined.project_id, combined.sort_date DESC) se on se.project_id = p.project_id
    left join (SELECT DISTINCT p.project_id
      FROM data_map_1.dm_project_data p
      JOIN phoenix.object_status os ON os.id = p.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      JOIN (
        SELECT project_id, MAX(end_time::date) AS latest_completed_appt
        FROM (
          SELECT project_id, end_time
          FROM data_map_1.dm_ev_41_data ev
          JOIN phoenix.object_status os2 ON os2.id = ev.object_status_id
          JOIN phoenix.base_status bs2 ON bs2.id = os2.base_status_id
          WHERE ev.archived = false AND ev.end_time IS NOT NULL
            AND bs2.base_status = 'COMPLETE'
          UNION ALL
          SELECT project_id, end_time
          FROM data_map_1.dm_ev_43_data ev
          JOIN phoenix.object_status os2 ON os2.id = ev.object_status_id
          JOIN phoenix.base_status bs2 ON bs2.id = os2.base_status_id
          WHERE ev.archived = false AND ev.end_time IS NOT NULL
            AND bs2.base_status = 'COMPLETE'
        ) completed_events
        GROUP BY project_id
      ) recent ON recent.project_id = p.project_id
        AND recent.latest_completed_appt >= CURRENT_DATE - INTERVAL '3 days'
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_682 IS NULL
        AND bs.base_status NOT IN ('COMPLETE','CANCELED')) piv on piv.project_id = p.project_id
    left join (SELECT
        p.project_id,
        p.osc_669::date AS work_started_date
      FROM data_map_1.dm_project_data p
      JOIN phoenix.object_status os ON os.id = p.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_669 IS NOT NULL
        AND p.osc_682 IS NULL
        AND bs.base_status NOT IN ('COMPLETE', 'CANCELED')
        AND (CURRENT_DATE - p.osc_669::date) <= 30) ws on ws.project_id = p.project_id
    left join (SELECT
        project_id,
        osc_1176::date AS estimated_rts_date
      FROM data_map_1.dm_pb_11_data
      WHERE osc_633 IS NOT NULL
        AND osc_635 IS NULL) sh on sh.project_id = p.project_id
    left join (SELECT DISTINCT ON (ev.project_id)
        ev.project_id,
        ev.osc_511::date AS expected_permit_date
      FROM data_map_1.dm_ev_40_data ev
      JOIN phoenix.object_status os ON os.id = ev.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      WHERE ev.archived = false
        AND ev.osc_511 IS NOT NULL
        AND ev.osc_511::date >= CURRENT_DATE
        AND bs.base_status NOT IN ('COMPLETE', 'CANCELED')
      ORDER BY ev.project_id, ev.start_time DESC) epd on epd.project_id = p.project_id
    left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main = true and c.archived = false
    left join phoenix.record r on r.id = c.osc_849
    left join (SELECT p.project_id, p.osc_671::date AS iv_date
      FROM data_map_1.dm_project_data p
      JOIN phoenix.object_status os ON os.id = p.object_status_id
      JOIN phoenix.base_status bs ON bs.id = os.base_status_id
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_671 IS NOT NULL
        AND p.osc_682 IS NULL
        AND bs.base_status NOT IN ('CANCELED')) ivc on ivc.project_id = p.project_id
    left join (select sf.state_abbr, sf.financier_name,
        case when sf.n >= 30 then sf.m1_p25 when coalesce(st.n, 0) >= 30 then st.m1_p25 else nat.m1_p25 end as m1_p25,
        case when sf.n >= 30 then sf.m1_p50 when coalesce(st.n, 0) >= 30 then st.m1_p50 else nat.m1_p50 end as m1_p50,
        case when sf.n >= 30 then sf.m1_p75 when coalesce(st.n, 0) >= 30 then st.m1_p75 else nat.m1_p75 end as m1_p75
      from (SELECT
        s.abbreviation AS state_abbr,
        r.record_name AS financier_name,
        COUNT(*) AS n,
        PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p25,
        PERCENTILE_CONT(0.50) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p50,
        PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p75
      FROM data_map_1.dm_project_data p
      JOIN phoenix.state s ON s.id = p.state_id
      JOIN data_map_1.dm_pb_3_data c ON c.project_id = p.project_id AND c.main = true AND c.archived = false
      JOIN phoenix.record r ON r.id = c.osc_849
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_671 IS NOT NULL AND p.osc_682 IS NOT NULL
        AND p.osc_660 >= '2025-01-01'
        AND (p.osc_682::date - p.osc_671::date) >= 0
      GROUP BY s.abbreviation, r.record_name) sf
      left join (SELECT
        s.abbreviation AS state_abbr,
        COUNT(*) AS n,
        PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p25,
        PERCENTILE_CONT(0.50) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p50,
        PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p75
      FROM data_map_1.dm_project_data p
      JOIN phoenix.state s ON s.id = p.state_id
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_671 IS NOT NULL AND p.osc_682 IS NOT NULL
        AND p.osc_660 >= '2025-01-01'
        AND (p.osc_682::date - p.osc_671::date) >= 0
      GROUP BY s.abbreviation) st on st.state_abbr = sf.state_abbr
      cross join (SELECT
        PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p25,
        PERCENTILE_CONT(0.50) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p50,
        PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p75
      FROM data_map_1.dm_project_data p
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_671 IS NOT NULL AND p.osc_682 IS NOT NULL
        AND p.osc_660 >= '2025-01-01'
        AND (p.osc_682::date - p.osc_671::date) >= 0) nat) mm on mm.state_abbr = s.abbreviation and mm.financier_name = r.record_name
    left join (SELECT
        s.abbreviation AS state_abbr,
        COUNT(*) AS n,
        PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p25,
        PERCENTILE_CONT(0.50) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p50,
        PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p75
      FROM data_map_1.dm_project_data p
      JOIN phoenix.state s ON s.id = p.state_id
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_671 IS NOT NULL AND p.osc_682 IS NOT NULL
        AND p.osc_660 >= '2025-01-01'
        AND (p.osc_682::date - p.osc_671::date) >= 0
      GROUP BY s.abbreviation) mms on mms.state_abbr = s.abbreviation
    left join (SELECT
        PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p25,
        PERCENTILE_CONT(0.50) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p50,
        PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY p.osc_682::date - p.osc_671::date)::int AS m1_p75
      FROM data_map_1.dm_project_data p
      WHERE p.archived = false AND coalesce(cast(p.osc_4076 as integer), 0) = 0
        AND p.osc_671 IS NOT NULL AND p.osc_682 IS NOT NULL
        AND p.osc_660 >= '2025-01-01'
        AND (p.osc_682::date - p.osc_671::date) >= 0) mmn on true
    where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
      and bs.base_status not in ('COMPLETE', 'CANCELED')
      and p.osc_682 is null
      and coalesce(r.record_name, '') not ilike '%mosaic%'
      and coalesce(r.record_name, '') not ilike '%sunnova%'
      and p.object_status_id not in (58, 206, 83, 63)  -- Retention and other excluded statuses
      and p.object_type_id != 7  -- not Roof / R&R
      and p.project_id not in (select project_id from data_map_1.dm_pb_20_data where object_status_id in (84, 207, 86))  -- compliance
      and p.osc_676 is null) pb
  cross join lateral (
    -- scheduled: the appointment day, a Standard Install 60% there and 40% a week later
    select (pb.scheduled_install_date + o.d * interval '1 day')::date as d, o.w * pb.retention_factor as u
    from (values (0, 0.6, true), (7, 0.4, true), (0, 1.0, false)) o(d, w, slip)
    where pb.scheduled_install_date is not null and o.slip = coalesce(pb.slippage_applies, false)
    union all
    -- pending IV: today, 1 unit
    select current_date, 1.0 where pb.tier = 'P'
    union all
    -- everything else: milestone + P25/P50/P75 days (never before today), thirds; halves on P25/P50 once overdue
    select greatest((pb.milestone_date + o.d * interval '1 day')::date, (current_date + o.d * interval '1 day')::date),
      case when (pb.milestone_date + pb.tier_p50 * interval '1 day')::date < current_date then 0.5 else round(1.0 / 3.0, 4) end * pb.retention_factor
    from unnest(case when (pb.milestone_date + pb.tier_p50 * interval '1 day')::date < current_date then array[pb.tier_p25, pb.tier_p50]
      else array[pb.tier_p25, pb.tier_p50, pb.tier_p75] end) o(d)
    where pb.scheduled_install_date is null and pb.milestone_date is not null and pb.tier != 'P'
  ) b
  union all
  -- 3. forecasted sales: future weeks' sales target x 58%, a third on each scenario, $30,607.03 and 8.877 kW apiece
  select (sw.week_start + o.d * interval '1 day')::date, sw.state_abbr, 'Forecasted Sale', round(sw.weekly_units / 3.0 * wm.w, 4),
    round(30607.03 * (sw.weekly_units / 3.0 * wm.w), 2), 8.877
  from (SELECT
        sfr.state_abbr, weeks.week_start, sfr.sale_month,
        CASE
          WHEN ROW_NUMBER() OVER (PARTITION BY sfr.state_abbr, sfr.sale_month ORDER BY weeks.week_start) = 1
            THEN FLOOR(sfr.forecast_units * 0.58) - (FLOOR(FLOOR(sfr.forecast_units * 0.58)::numeric / COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month)) * (COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month) - 1))::int
          ELSE FLOOR(FLOOR(sfr.forecast_units * 0.58)::numeric / COUNT(*) OVER (PARTITION BY sfr.state_abbr, sfr.sale_month))::int
        END AS weekly_units,
        sm.sold_p25, sm.sold_p50, sm.sold_p75
      FROM (SELECT *
      FROM (VALUES
        ('VA','2026-12-01'::date,20),('OH','2026-12-01'::date,20)) AS t(state_abbr, sale_month, forecast_units)
      WHERE forecast_units > 0
        AND sale_month >= DATE_TRUNC('month', CURRENT_DATE)) sfr JOIN (select s.abbreviation as state,
    case when count(d.sold) >= 30 then percentile_cont(0.25) within group (order by d.sold) else 120 end::int as sold_p25,
    case when count(d.sold) >= 30 then percentile_cont(0.50) within group (order by d.sold) else 148 end::int as sold_p50,
    case when count(d.sold) >= 30 then percentile_cont(0.75) within group (order by d.sold) else 180 end::int as sold_p75
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  cross join lateral (select case when p.osc_682 - p.osc_660 > 0 then p.osc_682 - p.osc_660 end as sold) d
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0
    and p.osc_660 >= '2025-01-01' and s.abbreviation != 'PA'
  group by s.abbreviation
  union all
  -- Pennsylvania: Virginia's projects, every year, no 30-project minimum
  select 'PA',
    percentile_cont(0.25) within group (order by d.sold)::int,
    percentile_cont(0.50) within group (order by d.sold)::int,
    percentile_cont(0.75) within group (order by d.sold)::int
  from data_map_1.dm_project_data p
  join phoenix.state s on s.id = p.state_id
  cross join lateral (select case when p.osc_682 - p.osc_660 > 0 then p.osc_682 - p.osc_660 end as sold) d
  where p.archived = false and coalesce(cast(p.osc_4076 as integer), 0) = 0 and s.abbreviation = 'VA') sm ON sm.state = sfr.state_abbr
      JOIN LATERAL (
        SELECT gs::date AS week_start
        FROM GENERATE_SERIES(
          GREATEST(
            DATE_TRUNC('week', sfr.sale_month + INTERVAL '1 day')::date,
            (DATE_TRUNC('week', CURRENT_DATE) + INTERVAL '7 days')::date
          ),
          (sfr.sale_month + INTERVAL '1 month - 1 day')::date,
          INTERVAL '1 week'
        ) gs
        WHERE gs >= sfr.sale_month
      ) weeks ON true) sw
  cross join lateral (values (sw.sold_p25), (sw.sold_p50), (sw.sold_p75)) o(d)
  join (values ('VA', 1.0), ('OH', 0.5), ('OH', 0.5), ('PA', 1.0), ('MI', 1.0), ('IL', 1.0), ('CA', 1.0), ('FL', 1.0),
    ('CO', 1.0), ('WA', 1.0), ('TX', 1.0), ('OR', 1.0), ('UT', 1.0)) wm(state_abbr, w) on wm.state_abbr = sw.state_abbr  -- Ohio splits over two warehouses
) f
where f.predicted_date::date between :start_date and :end_date

Pitfalls:

  • A forecast as of today; the sheet has no date control and shows every month. On 2026-12-02: 2,006 actual approvals in 2026, 116 units for installed jobs awaiting M1, 306 for the rest of the pipeline and 22 for forecasted sales.
  • Lumen times it to M1 Approved (OSC 682). QuickSight's dataset times it to M2 Approved (OSC 685) and counts installs as its actuals, so its figures are not M1 approvals at all (Lumen PR #175; accepted).
  • Installed jobs not yet approved ("IV Complete") use IV-to-M1 percentiles by state and financier (30 or more), else by state, else national. Every other tier keeps Install Forecast's dates: a scheduled or pending-IV job's M1 approval is forecast on its install day and a work-started job's within 0–5 days, with no lag for funding.
  • Pennsylvania uses Virginia's milestone-to-M1 timelines (every year, no minimum). The sales targets end in December 2026 (20 each for Virginia and Ohio), so from 2027 nothing new is forecast to sell.
  • Not the Executive Dashboard's M1 Approved (All Types), which counts past approvals only; a past month here equals it (246 in October 2026).

Crew Event Days

Crew Capacity Installation: Booked Days by Crew heat map (crew by day) · target none

Also called: Crew Capacity; crew days booked

Definition: Days booked for install crews: each event assigned to a crew counts once for every day it spans, leaving out canceled, called-off and rescheduled events.

SQL
select count(*) as value
from (select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id
    from data_map_1.dm_ev_41_data e  -- install appointments
    cross join lateral (select 1 from (values
        (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%'),  -- Standard Install
        (e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%'),  -- Finish Install
        (e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'),  -- Other Install
        (e.osc_824 is null or not (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%' or e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%' or e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'))  -- Un-classified Install
      ) t(hit) where t.hit) t
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_42_data e  -- Final Inspection
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_44_data e  -- Correction Work
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_43_data e  -- ESC Appointment
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_57_data e  -- ESC Inspection
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_65_data e  -- Home Damage Assessment
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_66_data e  -- Home Damage Repair
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_61_data e  -- Meter Spot
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_70_data e  -- Panel Removal
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_46_data e  -- Removal Appointment
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_54_data e  -- Roof Leak Assessment
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_55_data e  -- Roof Leak Repair
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_52_data e  -- Rough Inspection
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_73_data e  -- R&R Reinstall
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_72_data e  -- R&R Removal
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_45_data e  -- Service Appointment
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_60_data e  -- TDR
  ) e
join phoenix.object_status os on os.id = e.object_status_id
join phoenix.organization o on o.id = e.org_id  -- the first assigned resource
left join data_map_1.dm_project_data p on p.project_id = e.project_id and p.archived = false  -- events on archived projects stay
cross join lateral generate_series(e.start_time::date, e.end_time::date, interval '1 day') d(day)  -- one row per day the event spans
where (o.organization_name like '%Crew%' or o.organization_name in ('Tron', 'DH Electric', 'KS Electric', 'IL - TRON', 'TruHome Pros', 'Tryzub Electric', 'Soljen', 'Sunstone', 'Solar Scapes', 'Buckeye Renewables', 'Cannon Solar', 'Next Level Energy'))  -- an install crew
  and os.object_status not in ('Canceled', 'Called Off', 'Rescheduled')
  and d.day::date between :start_date and :end_date
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account

Pitfalls:

  • Every event type counts when a crew is assigned (installs, corrections, service, removals and the rest), not only installs.
  • An install crew is an assignee whose name contains "Crew" (case-sensitive) or one of 12 named subcontractors (Tron, DH Electric, Sunstone and others); a new subcontractor needs adding to the list.
  • A three-day install counts 3. An install event whose scope matches two install types counts on both (24 events do).
  • Only the first assigned resource is read; archived events count, and so do events on archived projects.

Install Crew Events

Crew Capacity Installation: Events per Crew pivot (crew by event type) · target none

Also called: Events per Crew

Definition: Distinct events assigned to an install crew with at least one day in the range, whatever their status.

SQL
select count(distinct e.event_id) as value
from (select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id
    from data_map_1.dm_ev_41_data e  -- install appointments
    cross join lateral (select 1 from (values
        (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%'),  -- Standard Install
        (e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%'),  -- Finish Install
        (e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'),  -- Other Install
        (e.osc_824 is null or not (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%' or e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%' or e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'))  -- Un-classified Install
      ) t(hit) where t.hit) t
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_42_data e  -- Final Inspection
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_44_data e  -- Correction Work
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_43_data e  -- ESC Appointment
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_57_data e  -- ESC Inspection
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_65_data e  -- Home Damage Assessment
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_66_data e  -- Home Damage Repair
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_61_data e  -- Meter Spot
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_70_data e  -- Panel Removal
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_46_data e  -- Removal Appointment
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_54_data e  -- Roof Leak Assessment
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_55_data e  -- Roof Leak Repair
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_52_data e  -- Rough Inspection
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_73_data e  -- R&R Reinstall
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_72_data e  -- R&R Removal
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_45_data e  -- Service Appointment
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_60_data e  -- TDR
  ) e
join phoenix.organization o on o.id = e.org_id  -- the first assigned resource
left join data_map_1.dm_project_data p on p.project_id = e.project_id and p.archived = false  -- events on archived projects stay
cross join lateral generate_series(e.start_time::date, e.end_time::date, interval '1 day') d(day)  -- one row per day the event spans
where (o.organization_name like '%Crew%' or o.organization_name in ('Tron', 'DH Electric', 'KS Electric', 'IL - TRON', 'TruHome Pros', 'Tryzub Electric', 'Soljen', 'Sunstone', 'Solar Scapes', 'Buckeye Renewables', 'Cannon Solar', 'Next Level Energy'))  -- an install crew
  and d.day::date between :start_date and :end_date
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account

Pitfalls:

  • Any status, canceled and rescheduled included, unlike Crew Event Days beside it.
  • An event spanning the range's edge counts if any of its days falls inside.

Inspections by Inspector Day

Crew Capacity Inspection: Inspections by Inspector heat map (inspector by end day) · target none

Also called: Inspections (Crew Capacity)

Definition: Final and rough inspections, counted once for every day each spans, dated by the day the inspection ends.

SQL
select count(*) as value
from (select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_42_data e  -- Final Inspection
    union all select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.resource_ids[1] as org_id, e.object_status_id from data_map_1.dm_ev_52_data e  -- Rough Inspection
  ) e
left join data_map_1.dm_project_data p on p.project_id = e.project_id and p.archived = false  -- events on archived projects stay
cross join lateral (select g from generate_series(e.start_time::date, e.end_time::date, interval '1 day') g
    where e.start_time is not null and e.end_time is not null
    union all select null where e.start_time is null or e.end_time is null) d  -- one row per day spanned
where e.end_time::date between :start_date and :end_date
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account

Pitfalls:

  • Any status: canceled, failed and missed inspections all count.
  • A two-day inspection counts twice, both times on its end day's range.
  • Not the Engineering Dashboard's Inspections Passed or the Install Crew Leaderboard's inspection counts, which count decided inspections once.

Events Scheduled (Projects)

Crew Capacity Scheduling: Events Scheduled tile · target none
Crew Capacity Scheduling: Events Scheduled by Type (Scheduled for Time Frame) board · target none

Also called: Events Scheduled; projects scheduled

Definition: Projects with an install or ESC appointment starting in the range that isn't canceled or called off.

SQL
select count(distinct e.project_id) as value
from (select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.date_created, e.osc_2594 as scheduled_on, e.object_status_id
    from data_map_1.dm_ev_41_data e  -- Standard, Finish, Other and Un-classified Installs
    cross join lateral (select 1 from (values
        (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%'),  -- Standard Install
        (e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%'),  -- Finish Install
        (e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'),  -- Other Install
        (e.osc_824 is null or not (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%' or e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%' or e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'))  -- Un-classified Install
      ) t(hit) where t.hit) t
    union all
    select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.date_created, e.osc_2595 as scheduled_on, e.object_status_id
    from data_map_1.dm_ev_43_data e  -- ESC Appointment
  ) e
join phoenix.object_status os on os.id = e.object_status_id
left join data_map_1.dm_project_data p on p.project_id = e.project_id and p.archived = false  -- events on archived projects stay
cross join lateral (select g from generate_series(e.start_time::date, e.end_time::date, interval '1 day') g
    where e.start_time is not null and e.end_time is not null
    union all select null where e.start_time is null or e.end_time is null) d  -- one row per day spanned
where os.object_status not in ('Canceled', 'Called Off')  -- scheduled: status set, not canceled or called off
  and e.start_time::date between :start_date and :end_date
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account

Pitfalls:

  • Titled Events Scheduled but counts projects: a project with an install and an ESC appointment counts once (Conflict 29).
  • Dated by the appointment's start, not the day it was booked: Events Scheduled During the Range (Projects) is the booking-day version.
  • Kin of the Weekly KPI Report's Installs Scheduled (projects) (row 47), which counts install appointments only, in the week after the report week.

Events Scheduled per Account

Crew Capacity Scheduling: Events Scheduled Per Account tile · target none

Also called: Events per project

Definition: Install and ESC event-days starting in the range per project.

SQL
select count(*)::numeric / nullif(count(distinct e.project_id), 0) as value,
  count(*) as num, count(distinct e.project_id) as den
from (select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.date_created, e.osc_2594 as scheduled_on, e.object_status_id
    from data_map_1.dm_ev_41_data e  -- Standard, Finish, Other and Un-classified Installs
    cross join lateral (select 1 from (values
        (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%'),  -- Standard Install
        (e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%'),  -- Finish Install
        (e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'),  -- Other Install
        (e.osc_824 is null or not (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%' or e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%' or e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'))  -- Un-classified Install
      ) t(hit) where t.hit) t
    union all
    select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.date_created, e.osc_2595 as scheduled_on, e.object_status_id
    from data_map_1.dm_ev_43_data e  -- ESC Appointment
  ) e
join phoenix.object_status os on os.id = e.object_status_id
left join data_map_1.dm_project_data p on p.project_id = e.project_id and p.archived = false  -- events on archived projects stay
cross join lateral (select g from generate_series(e.start_time::date, e.end_time::date, interval '1 day') g
    where e.start_time is not null and e.end_time is not null
    union all select null where e.start_time is null or e.end_time is null) d  -- one row per day spanned
where os.object_status not in ('Canceled', 'Called Off')  -- scheduled: status set, not canceled or called off
  and e.start_time::date between :start_date and :end_date
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account

Pitfalls:

  • Counts day rows, not events: a three-day install counts 3, so this reads higher than events per project.
  • An install whose scope matches two install types counts twice.

Events Canceled

Crew Capacity Scheduling: Events Canceled tile · target none

Also called: Canceled appointments

Definition: Install and ESC events starting in the range whose status is now Canceled.

SQL
select count(distinct e.event_id) as value
from (select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.date_created, e.osc_2594 as scheduled_on, e.object_status_id
    from data_map_1.dm_ev_41_data e  -- Standard, Finish, Other and Un-classified Installs
    cross join lateral (select 1 from (values
        (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%'),  -- Standard Install
        (e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%'),  -- Finish Install
        (e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'),  -- Other Install
        (e.osc_824 is null or not (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%' or e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%' or e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'))  -- Un-classified Install
      ) t(hit) where t.hit) t
    union all
    select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.date_created, e.osc_2595 as scheduled_on, e.object_status_id
    from data_map_1.dm_ev_43_data e  -- ESC Appointment
  ) e
join phoenix.object_status os on os.id = e.object_status_id
left join data_map_1.dm_project_data p on p.project_id = e.project_id and p.archived = false  -- events on archived projects stay
cross join lateral (select g from generate_series(e.start_time::date, e.end_time::date, interval '1 day') g
    where e.start_time is not null and e.end_time is not null
    union all select null where e.start_time is null or e.end_time is null) d  -- one row per day spanned
where os.object_status = 'Canceled'
  and e.start_time::date between :start_date and :end_date
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account

Pitfalls:

  • Status today, and only Canceled: Called Off, No Show and Rescheduled don't count. The Weekly KPI Report's Called Off / Canceled / No Show % (row 50) is a share and counts all three.
  • An event canceled before it got a start time has none and never counts.

Event Created to Event Start

Crew Capacity Scheduling: Event Created - Event Start Date tile · target none

Also called: Booking lead time

Definition: Average calendar days from an install or ESC event's creation to its start, for events starting in the range.

SQL
select avg(e.start_time::date - e.date_created::date) as value
from (select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.date_created, e.osc_2594 as scheduled_on, e.object_status_id
    from data_map_1.dm_ev_41_data e  -- Standard, Finish, Other and Un-classified Installs
    cross join lateral (select 1 from (values
        (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%'),  -- Standard Install
        (e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%'),  -- Finish Install
        (e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'),  -- Other Install
        (e.osc_824 is null or not (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%' or e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%' or e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'))  -- Un-classified Install
      ) t(hit) where t.hit) t
    union all
    select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.date_created, e.osc_2595 as scheduled_on, e.object_status_id
    from data_map_1.dm_ev_43_data e  -- ESC Appointment
  ) e
join phoenix.object_status os on os.id = e.object_status_id
left join data_map_1.dm_project_data p on p.project_id = e.project_id and p.archived = false  -- events on archived projects stay
cross join lateral (select g from generate_series(e.start_time::date, e.end_time::date, interval '1 day') g
    where e.start_time is not null and e.end_time is not null
    union all select null where e.start_time is null or e.end_time is null) d  -- one row per day spanned
where os.object_status not in ('Canceled', 'Called Off')  -- scheduled: status set, not canceled or called off
  and e.start_time::date between :start_date and :end_date
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account

Pitfalls:

  • Averaged over day rows, so a three-day install weighs three times a one-day ESC.
  • Measured from the event record's creation, not from when it was given its date (Date Event Was Scheduled).

Events Scheduled During the Range (Projects)

Crew Capacity Scheduling: Events Scheduled by Type (Scheduled During Time Frame) board · target none

Also called: Projects booked in the range

Definition: Projects with an install or ESC appointment booked in the range (by Date Event Was Scheduled), not canceled or called off.

SQL
select count(distinct e.project_id) as value
from (select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.date_created, e.osc_2594 as scheduled_on, e.object_status_id
    from data_map_1.dm_ev_41_data e  -- Standard, Finish, Other and Un-classified Installs
    cross join lateral (select 1 from (values
        (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%'),  -- Standard Install
        (e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%'),  -- Finish Install
        (e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'),  -- Other Install
        (e.osc_824 is null or not (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%' or e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%' or e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'))  -- Un-classified Install
      ) t(hit) where t.hit) t
    union all
    select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.date_created, e.osc_2595 as scheduled_on, e.object_status_id
    from data_map_1.dm_ev_43_data e  -- ESC Appointment
  ) e
join phoenix.object_status os on os.id = e.object_status_id
left join data_map_1.dm_project_data p on p.project_id = e.project_id and p.archived = false  -- events on archived projects stay
cross join lateral (select g from generate_series(e.start_time::date, e.end_time::date, interval '1 day') g
    where e.start_time is not null and e.end_time is not null
    union all select null where e.start_time is null or e.end_time is null) d  -- one row per day spanned
where os.object_status not in ('Canceled', 'Called Off')  -- scheduled: status set, not canceled or called off
  and e.scheduled_on::date between :start_date and :end_date  -- Date Event Was Scheduled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account

Pitfalls:

  • Dated by Date Event Was Scheduled (OSC 2594 on installs, 2595 on ESC), whenever the appointment itself falls.
  • Counts projects, like Events Scheduled (Projects).

Install and ESC Events Scheduled

Crew Capacity Scheduling: Events Scheduled by Coordinator (Scheduled for Time Frame) pivot · target none
Crew Capacity Scheduling: Events Scheduled by Event Date bars · target none

Also called: Event Count

Definition: Install and ESC events starting in the range that aren't canceled or called off.

SQL
select count(distinct e.event_id) as value
from (select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.date_created, e.osc_2594 as scheduled_on, e.object_status_id
    from data_map_1.dm_ev_41_data e  -- Standard, Finish, Other and Un-classified Installs
    cross join lateral (select 1 from (values
        (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%'),  -- Standard Install
        (e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%'),  -- Finish Install
        (e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'),  -- Other Install
        (e.osc_824 is null or not (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%' or e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%' or e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'))  -- Un-classified Install
      ) t(hit) where t.hit) t
    union all
    select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.date_created, e.osc_2595 as scheduled_on, e.object_status_id
    from data_map_1.dm_ev_43_data e  -- ESC Appointment
  ) e
join phoenix.object_status os on os.id = e.object_status_id
left join data_map_1.dm_project_data p on p.project_id = e.project_id and p.archived = false  -- events on archived projects stay
cross join lateral (select g from generate_series(e.start_time::date, e.end_time::date, interval '1 day') g
    where e.start_time is not null and e.end_time is not null
    union all select null where e.start_time is null or e.end_time is null) d  -- one row per day spanned
where os.object_status not in ('Canceled', 'Called Off')  -- scheduled: status set, not canceled or called off
  and e.start_time::date between :start_date and :end_date
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account

Pitfalls:

  • Counts events, where the Events Scheduled tile counts projects.
  • By coordinator, an event with no scheduler recorded reads "(blank)" (QuickSight shows a single space).

Install and ESC Events Booked in the Range

Crew Capacity Scheduling: Events Scheduled by Coordinator (Scheduled During Time Frame) pivot · target none
Crew Capacity Scheduling: Events Scheduled by Event Date (Scheduled During Time Frame) bars · target none

Also called: Event Count (scheduled during)

Definition: Install and ESC events booked in the range (by Date Event Was Scheduled), not canceled or called off.

SQL
select count(distinct e.event_id) as value
from (select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.date_created, e.osc_2594 as scheduled_on, e.object_status_id
    from data_map_1.dm_ev_41_data e  -- Standard, Finish, Other and Un-classified Installs
    cross join lateral (select 1 from (values
        (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%'),  -- Standard Install
        (e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%'),  -- Finish Install
        (e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'),  -- Other Install
        (e.osc_824 is null or not (e.osc_824::varchar like '%426%' or e.osc_824::varchar like '%427%' or e.osc_824::varchar like '%878%' or e.osc_824::varchar like '%879%' or e.osc_824::varchar like '%428%' or e.osc_824::varchar like '%429%' or e.osc_824::varchar like '%430%' or e.osc_824::varchar like '%1210%'))  -- Un-classified Install
      ) t(hit) where t.hit) t
    union all
    select e.project_process_block_event_id as event_id, e.project_id, e.start_time, e.end_time, e.date_created, e.osc_2595 as scheduled_on, e.object_status_id
    from data_map_1.dm_ev_43_data e  -- ESC Appointment
  ) e
join phoenix.object_status os on os.id = e.object_status_id
left join data_map_1.dm_project_data p on p.project_id = e.project_id and p.archived = false  -- events on archived projects stay
cross join lateral (select g from generate_series(e.start_time::date, e.end_time::date, interval '1 day') g
    where e.start_time is not null and e.end_time is not null
    union all select null where e.start_time is null or e.end_time is null) d  -- one row per day spanned
where os.object_status not in ('Canceled', 'Called Off')  -- scheduled: status set, not canceled or called off
  and e.scheduled_on::date between :start_date and :end_date  -- Date Event Was Scheduled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account

Pitfalls:

  • Booked in the range, but the bars spread them over the days the events take place, which can fall outside the range.

First Time Pass (Install Appointments)

Install Crew Leaderboard Installations: Crew Leaderboard (Field Audit Results), First Time Pass · target none
Install Crew Leaderboard Total Performance: Crew Total Job Results, First Time Pass · target none

Also called: First Time Pass

Definition: Projects' first install appointments, ending in the range, that field audit found Work Complete.

SQL
select count(*) as value
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date
  and e.end_time = x.first_end
  and fa.list_value = 'Work Complete'

Pitfalls:

  • "First" is the project's first install appointment not canceled over its whole history, by end time. QuickSight takes the first inside the selected dates, so a return visit counts as first there when the first visit fell before the range (Conflict 37).
  • Every project type, archived projects included, test accounts left out.

First Time Fail (Crew)

Install Crew Leaderboard Installations: Crew Leaderboard (Field Audit Results), First Time Fail · target none

Also called: First Time Fail Crew Attributable

Definition: Projects' first install appointments, ending in the range, that list Crew among their attributable departments.

SQL
select count(*) as value
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date
  and e.end_time = x.first_end
  and exists (select 1 from phoenix.list_value lv where lv.id = any(e.osc_4489) and lv.list_value like '%Crew%')  -- Attributable Department names Crew

Pitfalls:

  • "First" is the project's first install appointment not canceled over its whole history, by end time. QuickSight takes the first inside the selected dates, so a return visit counts as first there when the first visit fell before the range (Conflict 37).
  • Whatever the audit result: a Crew attribution counts as a fail even on an appointment audited Work Complete, or not yet audited.
  • The crew is charged when Attributable Department (OSC 4489) lists any value containing "Crew", alone or beside another department.

First Time Pass Rate (Crew)

Install Crew Leaderboard Installations: Crew Leaderboard, First Time Pass Rate; headline · target none

Also called: First Time Pass Rate (crew attributable)

Definition: Of projects' first install appointments ending in the range, passes over passes plus the ones the crew was charged for.

SQL
select count(*) filter (where e.end_time = x.first_end and fa.list_value = 'Work Complete')::numeric / nullif(count(*) filter (where e.end_time = x.first_end and fa.list_value = 'Work Complete') + count(*) filter (where e.end_time = x.first_end and exists (select 1 from phoenix.list_value lv where lv.id = any(e.osc_4489) and lv.list_value like '%Crew%')), 0) as value,
  count(*) filter (where e.end_time = x.first_end and fa.list_value = 'Work Complete') as num, count(*) filter (where e.end_time = x.first_end and fa.list_value = 'Work Complete') + count(*) filter (where e.end_time = x.first_end and exists (select 1 from phoenix.list_value lv where lv.id = any(e.osc_4489) and lv.list_value like '%Crew%')) as den
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date

Pitfalls:

  • "First" is the project's first install appointment not canceled over its whole history, by end time. QuickSight takes the first inside the selected dates, so a return visit counts as first there when the first visit fell before the range (Conflict 37).
  • Fails charged to anyone else leave the bottom, so this runs higher than First Time Pass Rate on Total Performance.
  • An appointment both passed and attributed to Crew counts on both sides.
  • Not the Weekly KPI Report's Install First-Pass Rate (row 51): that dates first attempts by start time, skips appointments audited Rescheduled / Canceled, and fails Work Incomplete whoever caused it (Conflict 37).

Install Appointments Passed Field Audit

Install Crew Leaderboard Installations: Crew Leaderboard, Total Pass · target none
Install Crew Leaderboard Total Performance: Crew Total Job Results, Total Pass · target none

Also called: Total Pass

Definition: Install appointments ending in the range that field audit found Work Complete.

SQL
select count(*) as value
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date
  and fa.list_value = 'Work Complete'

Pitfalls:

  • Counts appointments: a job that took two visits can pass twice.
  • Every project type, archived projects included, test accounts left out.

Overall Pass Rate (Crew)

Install Crew Leaderboard Installations: Crew Leaderboard, Overall Pass Rate; headline · target none
Install Crew Leaderboard Installations: Event Results Over Time (the line over daily bars) · target none

Also called: Overall Pass Rate (crew attributable); Event Results Overtime

Definition: Of install appointments ending in the range, passes over passes plus Work Incomplete ones the crew was charged for.

SQL
select count(*) filter (where fa.list_value = 'Work Complete')::numeric / nullif(count(*) filter (where fa.list_value = 'Work Complete') + count(*) filter (where fa.list_value = 'Work Incomplete' and exists (select 1 from phoenix.list_value lv where lv.id = any(e.osc_4489) and lv.list_value like '%Crew%')), 0) as value,
  count(*) filter (where fa.list_value = 'Work Complete') as num, count(*) filter (where fa.list_value = 'Work Complete') + count(*) filter (where fa.list_value = 'Work Incomplete' and exists (select 1 from phoenix.list_value lv where lv.id = any(e.osc_4489) and lv.list_value like '%Crew%')) as den
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date

Pitfalls:

  • QuickSight's Event Results Overtime line reads a field that counts fails only for three reasons no appointment carries any more, so it shows 100% every day; Lumen draws this rate instead.
  • The crew is charged when Attributable Department (OSC 4489) lists any value containing "Crew", alone or beside another department.

Install Appointments Not Dispositioned

Install Crew Leaderboard Installations: Crew Leaderboard, Not Dispositioned · target none
Install Crew Leaderboard Total Performance: Crew Total Job Results, Not Dispositioned · target none

Also called: Not Dispositioned

Definition: Install appointments ending in the range with no field audit outcome yet.

SQL
select count(*) as value
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date
  and fa.list_value is null  -- no Field Audit Outcome

Pitfalls:

  • Includes appointments that never needed an audit (No Show, Called Off and other statuses not canceled), so it isn't a pure audit backlog.

Total Fails (Crew)

Install Crew Leaderboard Installations: Crew Leaderboard, Total Fails · target none

Also called: Total Fails Crew Attributable

Definition: Install appointments ending in the range audited Work Incomplete with Crew among the attributable departments.

SQL
select count(*) as value
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date
  and fa.list_value = 'Work Incomplete'
  and exists (select 1 from phoenix.list_value lv where lv.id = any(e.osc_4489) and lv.list_value like '%Crew%')  -- Attributable Department names Crew

Pitfalls:

  • Unlike First Time Fail (Crew), needs a Work Incomplete result.
  • The crew is charged when Attributable Department (OSC 4489) lists any value containing "Crew", alone or beside another department.

First Time Fails (Install Appointments)

Install Crew Leaderboard Total Performance: Crew Total Job Results, First Time Fails · target none

Also called: First Time Fails

Definition: Projects' first install appointments, ending in the range, audited Work Incomplete, whoever caused it.

SQL
select count(*) as value
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date
  and e.end_time = x.first_end
  and fa.list_value = 'Work Incomplete'

Pitfalls:

  • "First" is the project's first install appointment not canceled over its whole history, by end time. QuickSight takes the first inside the selected dates, so a return visit counts as first there when the first visit fell before the range (Conflict 37).

Install Appointments Failed Field Audit

Install Crew Leaderboard Total Performance: Crew Total Job Results, Total Fails · target none

Also called: Total Fails

Definition: Install appointments ending in the range audited Work Incomplete, whoever caused it.

SQL
select count(*) as value
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date
  and fa.list_value = 'Work Incomplete'

Pitfalls:

  • Counts appointments, not projects.

First Time Field Audit Pass Rate

Install Crew Leaderboard Total Performance: Crew Total Job Results, First Time Pass Rate; headline · target none
Install Crew Leaderboard Total Performance: Field Audit Results Over Time (the line over weekly bars) · target none

Also called: First Time Pass Rate (Total Performance); fa_total_first_time_pass_rate

Definition: Of projects' first install appointments ending in the range and audited, the share audited Work Complete.

SQL
select count(*) filter (where e.end_time = x.first_end and fa.list_value = 'Work Complete')::numeric / nullif(count(*) filter (where e.end_time = x.first_end and fa.list_value = 'Work Complete') + count(*) filter (where e.end_time = x.first_end and fa.list_value = 'Work Incomplete'), 0) as value,
  count(*) filter (where e.end_time = x.first_end and fa.list_value = 'Work Complete') as num, count(*) filter (where e.end_time = x.first_end and fa.list_value = 'Work Complete') + count(*) filter (where e.end_time = x.first_end and fa.list_value = 'Work Incomplete') as den
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date

Pitfalls:

  • "First" is the project's first install appointment not canceled over its whole history, by end time. QuickSight takes the first inside the selected dates, so a return visit counts as first there when the first visit fell before the range (Conflict 37).
  • Not the Weekly KPI Report's Install First-Pass Rate (row 51): that dates first attempts by start time, skips appointments audited Rescheduled / Canceled, and fails Work Incomplete whoever caused it (Conflict 37).
  • The weekly bars run Sunday to Saturday by end time.

Total Field Audit Pass Rate

Install Crew Leaderboard Total Performance: Crew Total Job Results, Total Pass Rate; headline · target none

Also called: Total Pass Rate

Definition: Of install appointments ending in the range and audited, the share audited Work Complete.

SQL
select count(*) filter (where fa.list_value = 'Work Complete')::numeric / nullif(count(*) filter (where fa.list_value = 'Work Complete') + count(*) filter (where fa.list_value = 'Work Incomplete'), 0) as value,
  count(*) filter (where fa.list_value = 'Work Complete') as num, count(*) filter (where fa.list_value = 'Work Complete') + count(*) filter (where fa.list_value = 'Work Incomplete') as den
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date

Pitfalls:

  • Every fail counts, whoever caused it; Overall Pass Rate (Crew) counts only the crew's.

Incomplete Installs by Fail Reason

Install Crew Leaderboard Installations: Incomplete Installs by Fail Reason (Fail Reasons) · target none
Install Crew Leaderboard Total Performance: Incomplete Installs by Fail Reason (Field Audit Fail Reasons) · target none

Also called: Fail Reasons

Definition: Install appointments ending in the range audited Work Incomplete, by fail reason.

SQL
select coalesce(r3.list_value, r2.list_value, r1.list_value) as category, count(*) as value
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
left join phoenix.list_value r3 on r3.id = e.osc_3973  -- field audit's work incomplete reason
left join phoenix.list_value r2 on r2.id = e.osc_1052[1]  -- else the install's work incomplete reason
left join phoenix.list_value r1 on r1.id = e.osc_1051[1]  -- else its work not started reason
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date
  and fa.list_value = 'Work Incomplete'
group by 1
order by value desc

Pitfalls:

  • One reason per appointment: the field audit's, else the install's first work-incomplete reason, else its first not-started reason.
  • Installations drops appointments with no reason; Total Performance shows them as a blank bar.

Incomplete Installs by Attributable Department

Install Crew Leaderboard Total Performance: Incomplete Installs by Department (Field Audit Fail Attributable Department) · target none

Also called: Field Audit Fail Attributable Department

Definition: Install appointments ending in the range audited Work Incomplete, by each department they're attributed to.

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
join phoenix.list_value lv on lv.id = any(e.osc_4489)  -- each attributable department
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date
  and fa.list_value = 'Work Incomplete'
group by 1
order by value desc

Pitfalls:

  • An appointment charged to two departments counts in both, so the bars add to more than the fails.
  • Incomplete Installs by Attributable Department (With a Reason) on the Installations sheet keeps only appointments with a fail reason.

Incomplete Installs by Attributable Department (With a Reason)

Install Crew Leaderboard Installations: Incomplete Installs by Department (Attributable Department) · target none

Also called: Attributable Department

Definition: Install appointments ending in the range audited Work Incomplete and given a fail reason, by each department they're attributed to.

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
join phoenix.list_value lv on lv.id = any(e.osc_4489)
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date
  and fa.list_value = 'Work Incomplete'
  and coalesce(e.osc_3973, e.osc_1052[1], e.osc_1051[1]) is not null  -- has a fail reason
group by 1
order by value desc

Pitfalls:

  • Leaves out Work Incomplete appointments with no fail reason, which Total Performance's version counts.

Install Appointments by Status

Install Crew Leaderboard Installations: Install Appointments by Status (Event Result Breakdown) · target none

Also called: Event Result Breakdown

Definition: Install appointments ending in the range, by their status today.

SQL
select st.object_status as category, count(*) as value
from data_map_1.dm_ev_41_data e  -- install appointments
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.list_value fa on fa.id = e.osc_639  -- Field Audit Outcome
left join phoenix.object_status st on st.id = e.object_status_id
cross join lateral (select min(f.end_time) as first_end  -- the project's first appointment, by end time, over its whole history
    from data_map_1.dm_ev_41_data f
    join phoenix.object_status fos on fos.id = f.object_status_id
    where f.project_id = e.project_id and f.object_status_id != 12 and fos.object_status <> 'Canceled') x
where e.object_status_id != 12  -- not Canceled
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.end_time::date between :start_date and :end_date
group by 1
order by value desc

Pitfalls:

  • Canceled appointments (status 12) never appear: the dataset drops them.

Total Inspections (Crew)

Install Crew Leaderboard Inspections: Crew Leaderboard (Inspection Pass Rate), Total Inspections · target none
Install Crew Leaderboard Total Performance: Crew Leaderboard (Inspection Pass Rate), Total Inspections · target none
Operations Dashboard Inspections: Results by Install Crew board, Completed · target none

Also called: Total Inspections; crew_attributable_inspections

Definition: Final inspections starting in the range that passed, plus those that failed with Field among the fail attribution.

SQL
select count(*) filter (where st.object_status = 'Inspection Passed') + count(*) filter (where st.object_status = 'Inspection Failed' and exists (select 1 from phoenix.list_value lv where lv.id = any(i.osc_2349) and lv.list_value = 'Field')) as value
from data_map_1.dm_ev_42_data i  -- Final Inspection events
left join data_map_1.dm_project_data p on p.project_id = i.project_id
left join phoenix.object_status st on st.id = i.object_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and i.start_time::date between :start_date and :end_date

Pitfalls:

  • Leaves out failures charged to anyone but Field, so it is smaller than all decided inspections.
  • QuickSight tests the attribution text and drops any list naming Field Audit, "Field, Field Audit" included; Lumen counts Field among the picks in any order (Brendan accepted, 2026-11-22).

Failed Inspections (Crew)

Install Crew Leaderboard Inspections: Crew Leaderboard, Failed Inspections · target none
Operations Dashboard Inspections: Results by Install Crew board, Crew-Caused Fails · target none

Also called: Crew Attributable Fail

Definition: Final inspections starting in the range that failed with Field among the fail attribution (OSC 2349).

SQL
select count(*) as value
from data_map_1.dm_ev_42_data i  -- Final Inspection events
left join data_map_1.dm_project_data p on p.project_id = i.project_id
left join phoenix.object_status st on st.id = i.object_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and i.start_time::date between :start_date and :end_date
  and st.object_status = 'Inspection Failed' and exists (select 1 from phoenix.list_value lv where lv.id = any(i.osc_2349) and lv.list_value = 'Field')  -- Field among Fail Attributable's picks

Pitfalls:

  • Field only: Technician, Field Audit and ESC Electrician, which the Weekly KPI Report's Field-Attributable Pass Rate (row 69) also charges to the field, don't count (Conflict 23).

Inspection Pass Rate (Crew)

Install Crew Leaderboard Inspections: Crew Leaderboard, Pass Rate; headline · target none
Install Crew Leaderboard Inspections: Inspection Results Over Time (the line over daily bars) · target none
Operations Dashboard Inspections: Pass Rate, Crew-Caused tile; Results by Install Crew board, Pass Rate · target none

Also called: Crew attributable pass rate

Definition: Of final inspections starting in the range, passes over passes plus failures charged to Field.

SQL
select count(*) filter (where st.object_status = 'Inspection Passed')::numeric / nullif(count(*) filter (where st.object_status = 'Inspection Passed') + count(*) filter (where st.object_status = 'Inspection Failed' and exists (select 1 from phoenix.list_value lv where lv.id = any(i.osc_2349) and lv.list_value = 'Field')), 0) as value,
  count(*) filter (where st.object_status = 'Inspection Passed') as num, count(*) filter (where st.object_status = 'Inspection Passed') + count(*) filter (where st.object_status = 'Inspection Failed' and exists (select 1 from phoenix.list_value lv where lv.id = any(i.osc_2349) and lv.list_value = 'Field')) as den
from data_map_1.dm_ev_42_data i  -- Final Inspection events
left join data_map_1.dm_project_data p on p.project_id = i.project_id
left join phoenix.object_status st on st.id = i.object_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and i.start_time::date between :start_date and :end_date

Pitfalls:

  • The crew is the one on the project's latest install appointment (any status, canceled included), not the inspector or the crew that did the work being inspected.
  • Not the Engineering Dashboard's Inspection Overall Pass Rate (every decision, by outcome date) or the Weekly KPI Report's First-Time Inspection Pass Rate.

Passed Inspections by Install Crew

Install Crew Leaderboard Inspections: Crew Leaderboard, Passed Inspections · target none
Install Crew Leaderboard Total Performance: Crew Leaderboard (Inspection Pass Rate), Passed Inspections · target none
Operations Dashboard Inspections: Inspections Passed tile; Results boards, Passed · target none

Also called: Passed Inspections

Definition: Final inspection events starting in the range in status Inspection Passed.

SQL
select count(*) as value
from data_map_1.dm_ev_42_data i  -- Final Inspection events
left join data_map_1.dm_project_data p on p.project_id = i.project_id
left join phoenix.object_status st on st.id = i.object_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and i.start_time::date between :start_date and :end_date
  and st.object_status = 'Inspection Passed'

Pitfalls:

  • By the inspection's start time and its status today. The Engineering Dashboard's Inspections Passed reads the same events by outcome date and calls an inspection with no failed outcome a pass, so the two differ.
  • Every project type, archived projects included, test accounts left out.

Failed Inspections (All Causes)

Install Crew Leaderboard Total Performance: Crew Leaderboard (Inspection Pass Rate), Failed Inspections · target none
Operations Dashboard Inspections: Inspections Failed tile; Results boards, Failed · target none

Also called: Failed Inspections; total_fails

Definition: Final inspection events starting in the range in status Inspection Failed, whoever is charged.

SQL
select count(*) as value
from data_map_1.dm_ev_42_data i  -- Final Inspection events
left join data_map_1.dm_project_data p on p.project_id = i.project_id
left join phoenix.object_status st on st.id = i.object_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and i.start_time::date between :start_date and :end_date
  and st.object_status = 'Inspection Failed'

Pitfalls:

  • Status today: a failed inspection later re-passed on the same event counts as passed.

Inspection Pass Rate (All Causes)

Install Crew Leaderboard Total Performance: Crew Leaderboard (Inspection Pass Rate), Pass Rate; headline · target none
Install Crew Leaderboard Total Performance: Inspection Pass Rate Over Time (the line over daily bars) · target none
Operations Dashboard Inspections: Inspection Pass Rate tile; Results boards, Pass Rate; rate line on Results by Appointment Day · target none

Also called: Inspection Pass Rate; total_pass_rate

Definition: Of final inspections starting in the range that passed or failed, the share that passed.

SQL
select count(*) filter (where st.object_status = 'Inspection Passed')::numeric / nullif(count(*) filter (where st.object_status = 'Inspection Passed') + count(*) filter (where st.object_status = 'Inspection Failed'), 0) as value,
  count(*) filter (where st.object_status = 'Inspection Passed') as num, count(*) filter (where st.object_status = 'Inspection Passed') + count(*) filter (where st.object_status = 'Inspection Failed') as den
from data_map_1.dm_ev_42_data i  -- Final Inspection events
left join data_map_1.dm_project_data p on p.project_id = i.project_id
left join phoenix.object_status st on st.id = i.object_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and i.start_time::date between :start_date and :end_date

Pitfalls:

  • Counts every inspection event, repeats included; the Weekly KPI Report's First-Time Inspection Pass Rate counts each project's first outcome.

Inspection Fail Attributable Department

Install Crew Leaderboard Total Performance: Inspection Fail Attributable Department bars · target none

Also called: Inspection Fail Attributable Department

Definition: Final inspections ending in the range, by each department named in Fail Attributable (OSC 2349).

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_ev_42_data i  -- Final Inspection events
left join data_map_1.dm_project_data p on p.project_id = i.project_id
left join phoenix.object_status st on st.id = i.object_status_id
join phoenix.list_value lv on lv.id = any(i.osc_2349)
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and i.end_time::date between :start_date and :end_date
group by 1
order by value desc

Pitfalls:

  • Dated by end time, where the inspection counts beside it use start time.
  • No status filter: any inspection with an attribution counts, passed or canceled ones included.

Inspection Fail Reasons

Install Crew Leaderboard Total Performance: Inspection Fail Reasons bars · target none

Also called: Final Inspection Fail Reason

Definition: Final inspections ending in the range, by each fail reason recorded (OSC 727).

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_ev_42_data i  -- Final Inspection events
left join data_map_1.dm_project_data p on p.project_id = i.project_id
left join phoenix.object_status st on st.id = i.object_status_id
join phoenix.list_value lv on lv.id = any(i.osc_727)
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and i.end_time::date between :start_date and :end_date
group by 1
order by value desc

Pitfalls:

  • Dated by end time and not limited to failed inspections, like the attribution bars.

M1 Approvals (Install Crew Leaderboard)

Install Crew Leaderboard Funding: Crew Leaderboard (M1 Funding), M1 Approvals; M1 Results Over Time (Approved) · target none
Install Crew Leaderboard Total Performance: Crew Leaderboard (M1 Funding), M1 Approvals; M1 Results Over Time (Approved) · target none

Also called: M1 Approval Count

Definition: M1 Funding blocks with an approved date, among blocks whose M1 Date (rejected date, else approved date) falls in the range.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1468, n.osc_1161)::date between :start_date and :end_date  -- M1 Date: rejected, else approved
  and n.osc_1161 is not null

Pitfalls:

  • Counts blocks, not projects; the Executive Dashboard's M1 Approved counts distinct projects by approved date.
  • A block rejected in the range and approved later counts as an approval here, in the range it was rejected.
  • Every project type, archived projects included, test accounts left out.

M1 Rejections (Crew)

Install Crew Leaderboard Funding: Crew Leaderboard, M1 Rejections; M1 Results Over Time (Crew Rejection) · target none
Install Crew Leaderboard Total Performance: Crew Leaderboard (M1 Funding), M1 Rejections · target none

Also called: Crew Attributable M1 Rejections

Definition: M1 Funding blocks rejected, with Install Crew among the attributable teams (OSC 1469), by M1 Date.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1468, n.osc_1161)::date between :start_date and :end_date  -- M1 Date: rejected, else approved
  and n.osc_1468 is not null and exists (select 1 from phoenix.list_value lv where lv.id = any(n.osc_1469) and lv.list_value like '%Install Crew%')

Pitfalls:

  • Kin of the Weekly KPI Report's M1 Rejections: Install Crew-attributed (row 57), which counts by the week rejected.
  • Total Performance's M1 Rejections column is this crew count, though its pass rate counts every rejection.

Total M1 (Crew)

Install Crew Leaderboard Funding: Crew Leaderboard, Total M1 · target none
Install Crew Leaderboard Total Performance: Crew Leaderboard (M1 Funding), Total M1 · target none

Also called: total_crew_attributable_m1

Definition: M1 approvals plus M1 rejections charged to the install crew, by M1 Date.

SQL
select count(*) filter (where n.osc_1161 is not null) + count(*) filter (where n.osc_1468 is not null and exists (select 1 from phoenix.list_value lv where lv.id = any(n.osc_1469) and lv.list_value like '%Install Crew%')) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1468, n.osc_1161)::date between :start_date and :end_date  -- M1 Date: rejected, else approved

Pitfalls:

  • A block both approved and crew-rejected counts twice.

M1 Pass Rate (Crew)

Install Crew Leaderboard Funding: Crew Leaderboard, M1 Pass Rate; headline · target none
Install Crew Leaderboard Funding: M1 Results Over Time (the line over daily bars) · target none

Also called: crew_attributable_m1_pass_rate

Definition: M1 approvals over approvals plus rejections charged to the install crew, by M1 Date.

SQL
select count(*) filter (where n.osc_1161 is not null)::numeric / nullif(count(*) filter (where n.osc_1161 is not null) + count(*) filter (where n.osc_1468 is not null and exists (select 1 from phoenix.list_value lv where lv.id = any(n.osc_1469) and lv.list_value like '%Install Crew%')), 0) as value,
  count(*) filter (where n.osc_1161 is not null) as num, count(*) filter (where n.osc_1161 is not null) + count(*) filter (where n.osc_1468 is not null and exists (select 1 from phoenix.list_value lv where lv.id = any(n.osc_1469) and lv.list_value like '%Install Crew%')) as den
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1468, n.osc_1161)::date between :start_date and :end_date  -- M1 Date: rejected, else approved

Pitfalls:

  • Rejections charged to anyone else leave the bottom, so this runs near 100%.
  • The crew is the one on the project's latest install appointment (any status), not necessarily the crew that did the install (Conflict 27).

M1 Rejections (Install Crew Leaderboard)

Install Crew Leaderboard Total Performance: M1 Results Over Time (Rejected) · target none

Also called: total_m1_rejections

Definition: M1 Funding blocks with a rejected date, by M1 Date, whoever is charged.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1468, n.osc_1161)::date between :start_date and :end_date  -- M1 Date: rejected, else approved
  and n.osc_1468 is not null

Pitfalls:

  • Dated by the rejected date (M1 Date takes it first).

M1 Pass Rate (Install Crew Leaderboard)

Install Crew Leaderboard Total Performance: Crew Leaderboard (M1 Funding), M1 Pass Rate; headline · target none
Install Crew Leaderboard Total Performance: M1 Results Over Time (the line) · target none

Also called: overall_m1_pass_rate

Definition: M1 approvals over approvals plus every rejection, among blocks whose M1 Date falls in the range.

SQL
select count(*) filter (where n.osc_1161 is not null)::numeric / nullif(count(*) filter (where n.osc_1161 is not null) + count(*) filter (where n.osc_1468 is not null), 0) as value,
  count(*) filter (where n.osc_1161 is not null) as num, count(*) filter (where n.osc_1161 is not null) + count(*) filter (where n.osc_1468 is not null) as den
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1468, n.osc_1161)::date between :start_date and :end_date  -- M1 Date: rejected, else approved

Pitfalls:

  • Close to but not the Executive Dashboard's M1 Approval Rate (Executive): that counts an approval only when its own date falls in the range, while this counts any approved date on a block picked by M1 Date (Conflict 27).
  • Not the Engineering Dashboard's M1 Funding Overall Pass Rate, which dates by the approved date first.

Crew M1 Rejection Reasons

Install Crew Leaderboard Funding: Crew Rejection Reasons bars · target none

Also called: M1 Funding Rejection Reason (crew)

Definition: Crew-charged M1 rejections, by M1 Date, by each rejection reason (OSC 1248).

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
join phoenix.list_value lv on lv.id = any(n.osc_1248)
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1468, n.osc_1161)::date between :start_date and :end_date  -- M1 Date: rejected, else approved
  and n.osc_1468 is not null and exists (select 1 from phoenix.list_value lv where lv.id = any(n.osc_1469) and lv.list_value like '%Install Crew%')
group by lv.list_value
order by value desc

Pitfalls:

  • QuickSight's pie has no date filter and counts every crew rejection ever; Lumen reads the page's range.
  • A rejection with two reasons counts in both.

Crew M1 Rejection Attribution

Install Crew Leaderboard Funding: Crew Rejection Attribution bars · target none

Also called: M1 Funding Rejection Attributable (crew)

Definition: Crew-charged M1 rejections, by M1 Date, by each team they're attributed to (Install Crew always among them).

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
join phoenix.list_value lv on lv.id = any(n.osc_1469)
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1468, n.osc_1161)::date between :start_date and :end_date  -- M1 Date: rejected, else approved
  and n.osc_1468 is not null and exists (select 1 from phoenix.list_value lv where lv.id = any(n.osc_1469) and lv.list_value like '%Install Crew%')
group by lv.list_value
order by value desc

Pitfalls:

  • Shows the other teams sharing a crew rejection (Field Audit, Funding Agent and so on); the Install Crew bar equals M1 Rejections (Crew).
  • QuickSight's pie counts every crew rejection ever.

M1 Rejection Attributable Teams (All)

Install Crew Leaderboard Total Performance: M1 Rejection Attributable bars · target none

Also called: M1 Rejection Attributable

Definition: M1 Funding blocks rejected in the range (by rejected date), by each team the rejection is attributed to.

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks
left join data_map_1.dm_project_data p on p.project_id = n.project_id
join phoenix.list_value lv on lv.id = any(n.osc_1469)
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1468::date between :start_date and :end_date  -- by the rejected date
group by lv.list_value
order by value desc

Pitfalls:

  • Every team, eleven in all (Engineering, Field Audit, Financier, Funding Agent, Install Crew, Installers, Monitoring Portal / Manufacturer, Permitting, Procurement, Proposal Tool, Sales). The Executive Dashboard's M1 Rejections by Attributable Team (Executive) keeps only five of them.
  • QuickSight's pie lumps small slices into Other; Lumen shows each team (Brendan accepted, 2026-11-21).

Current Install Backlog

Install Crew Leaderboard Field Throughput by Market: Weekly Warehouse Breakdown, Current Backlog · target none

Also called: Current Backlog; current_week_backlog

Definition: Projects waiting on install as of today: active with no Install Verified date, plus every project on hold. Snapshot; takes no dates.

SQL
select count(*) as value
from data_map_1.dm_project_data p
join phoenix.object_status o on o.id = p.object_status_id
join phoenix.base_status b on b.id = o.base_status_id
left join data_map_1.dm_pb_21_data can on can.project_id = p.project_id and can.main = true  -- main Cancellation block
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status in ('ACTIVE', 'ON HOLD')  -- the board's filter
  and (p.osc_671 is null and b.base_status = 'ACTIVE' or b.base_status = 'ON HOLD')  -- AND binds first, as QuickSight's

Pitfalls:

  • Counts every On Hold project, even one already installed, because QuickSight's isNull(iv) AND ACTIVE OR ON HOLD binds AND first; Lumen keeps it (Conflict 38).
  • Every project type, by the project's warehouse (OSC 649); not the Weekly KPI Report's stage backlogs (rows 28 to 34).

Weeks of Install Capacity

Install Crew Leaderboard Field Throughput by Market: Weekly Warehouse Breakdown, Weeks of Capacity · target none

Also called: Weeks of Capacity; weeks_of_capacity

Definition: Current Install Backlog over the average weekly installs verified in the last three full weeks. Snapshot; takes no dates.

SQL
select count(*) filter (where (p.osc_671 is null and b.base_status = 'ACTIVE' or b.base_status = 'ON HOLD'))::numeric
    / nullif(count(*) filter (where p.osc_671::date between w.week_start - 21 and w.week_start - 1)::numeric / 3, 0) as value
from data_map_1.dm_project_data p
join phoenix.object_status o on o.id = p.object_status_id
join phoenix.base_status b on b.id = o.base_status_id
left join data_map_1.dm_pb_21_data can on can.project_id = p.project_id and can.main = true  -- main Cancellation block
cross join lateral (select current_date - extract(dow from current_date)::int as week_start) w  -- this week's Sunday
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status in ('ACTIVE', 'ON HOLD')  -- the board's filter

Pitfalls:

  • The three weeks run Sunday to Saturday and leave out the current week; the Weekly KPI Report's weeks of capacity use four weeks with the current one (Conflict 38).
  • Installs counted are only projects still Active or On Hold today, so a verified project that has since completed drops out.
  • Empty for a warehouse with no installs in those weeks.

Installs Verified by Week (Field Throughput)

Install Crew Leaderboard Field Throughput by Market: Weekly Warehouse Breakdown, This Week / Last Week / 2 Weeks / 3 Weeks IV · target none

Also called: This Week IV; Last Week IV

Definition: Projects now Active or On Hold whose Install Verified date falls in each of the last four Sunday-to-Saturday weeks, this week included. Snapshot; takes no dates.

SQL
select w.k as weeks_ago, w.week_start, count(*) filter (where p.osc_671::date between w.week_start and w.week_start + 6) as value
from data_map_1.dm_project_data p
join phoenix.object_status o on o.id = p.object_status_id
join phoenix.base_status b on b.id = o.base_status_id
left join data_map_1.dm_pb_21_data can on can.project_id = p.project_id and can.main = true  -- main Cancellation block
cross join lateral (select k, (current_date - extract(dow from current_date)::int - 7 * k) as week_start
    from generate_series(0, 3) k) w  -- this week (from Sunday) and the three before it
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status in ('ACTIVE', 'ON HOLD')  -- the board's filter
group by 1, 2
order by 1

Pitfalls:

  • Weeks are UTC, from Sunday; Lumen's other weekly views start on Monday.
  • Only projects still Active or On Hold count; not the Weekly KPI Report's Install Verified (row 10) or the Executive Dashboard's Install Verified (All Types).

Cancellation Requests by Week (Field Throughput)

Install Crew Leaderboard Field Throughput by Market: Weekly Warehouse Breakdown, This Week / Last Week / 2 Weeks / 3 Weeks Cancels · target none

Also called: This Week Cancels

Definition: Projects now Active or On Hold whose Cancellation Request Date (main Cancellation block, OSC 1676) falls in each of the last four Sunday weeks. Snapshot.

SQL
select w.k as weeks_ago, w.week_start, count(*) filter (where can.osc_1676::date between w.week_start and w.week_start + 6) as value
from data_map_1.dm_project_data p
join phoenix.object_status o on o.id = p.object_status_id
join phoenix.base_status b on b.id = o.base_status_id
left join data_map_1.dm_pb_21_data can on can.project_id = p.project_id and can.main = true  -- main Cancellation block
cross join lateral (select k, (current_date - extract(dow from current_date)::int - 7 * k) as week_start
    from generate_series(0, 3) k) w  -- this week (from Sunday) and the three before it
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status in ('ACTIVE', 'ON HOLD')  -- the board's filter
group by 1, 2
order by 1

Pitfalls:

  • A project whose cancellation went through is no longer Active or On Hold and drops out, so this counts requests still pending (or reversed), not cancellations.
  • Not the Weekly KPI Report's cancel rows, which read the Cancellation block's creation date.

Sales by Week (Field Throughput)

Install Crew Leaderboard Field Throughput by Market: Weekly Warehouse Breakdown, This Week / Last Week / 2 Weeks / 3 Weeks Sales · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: This Week Sales

Definition: Projects now Active or On Hold submitted (Project Sold, OSC 660) in each of the last four Sunday weeks. Snapshot.

SQL
select w.k as weeks_ago, w.week_start, count(*) filter (where p.osc_660::date between w.week_start and w.week_start + 6) as value
from data_map_1.dm_project_data p
join phoenix.object_status o on o.id = p.object_status_id
join phoenix.base_status b on b.id = o.base_status_id
left join data_map_1.dm_pb_21_data can on can.project_id = p.project_id and can.main = true  -- main Cancellation block
cross join lateral (select k, (current_date - extract(dow from current_date)::int - 7 * k) as week_start
    from generate_series(0, 3) k) w  -- this week (from Sunday) and the three before it
where p.archived = false
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status in ('ACTIVE', 'ON HOLD')  -- the board's filter
group by 1, 2
order by 1

Pitfalls:

  • Counts submissions (OSC 660, the report's "Project Sold"), not Deal Review closes; and only those still Active or On Hold, so canceled sales drop out.

Starting Install Backlog by Week

Install Crew Leaderboard Field Throughput by Market: Weekly Warehouse Breakdown, This Week / Last Week / 2 Weeks / 3 Weeks Starting Backlog · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: This Week Starting Backlog; this_week_backlog

Definition: The install backlog as each of the last four Sunday weeks began: today's Current Install Backlog with every week since unwound (its installs and cancellation requests added back, its sales taken off). Snapshot.

SQL
select x.weeks_ago, x.week_start, x.backlog + sum(x.unwound) over (order by x.weeks_ago) as value
from (select w.k as weeks_ago, w.week_start, count(*) filter (where (p.osc_671 is null and b.base_status = 'ACTIVE' or b.base_status = 'ON HOLD')) as backlog,
    count(*) filter (where p.osc_671::date between w.week_start and w.week_start + 6) + count(*) filter (where can.osc_1676::date between w.week_start and w.week_start + 6)
      - count(*) filter (where p.osc_660::date between w.week_start and w.week_start + 6) as unwound  -- the week's installs and cancel requests back, its sales off
  from data_map_1.dm_project_data p
  join phoenix.object_status o on o.id = p.object_status_id
  join phoenix.base_status b on b.id = o.base_status_id
  left join data_map_1.dm_pb_21_data can on can.project_id = p.project_id and can.main = true  -- main Cancellation block
  cross join lateral (select k, (current_date - extract(dow from current_date)::int - 7 * k) as week_start
    from generate_series(0, 3) k) w  -- this week (from Sunday) and the three before it
  where p.archived = false
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and b.base_status in ('ACTIVE', 'ON HOLD')  -- the board's filter
  group by 1, 2) x
order by 1

Pitfalls:

  • An estimate, not a record: it unwinds only what today's Active and On Hold projects show, so projects completed or canceled since never enter it.
  • Each week adds back that week's installs and cancellation requests and takes off its sales, cumulatively from this week back.

NTP Completed

Ops Leaderboards Deal Review board: This Week to Date, Last Week, Month to Date and Selected Range columns · target none

Sale date: Closed (OSC 687), the day the project Sold.

Also called: Deal Review; NTP Completed; ntp_submitted_by

Definition: Deal reviews completed per person: each NTP block, credited to its NTP Submitted By, on the project's Project Closed date.

SQL
select count(*) as value
from data_map_1.dm_pb_25_data n  -- NTP blocks (PB 25)
left join phoenix.user_position up on up.id = n.osc_2026  -- NTP submitted by
left join phoenix.user u on u.id = up.user_id
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_687::date between :start_date and :end_date
  and concat(u.first_name, ' ', u.last_name) <> ' '  -- a named user  -- Project Closed

Pitfalls:

  • Dated by the project's Project Closed date (OSC 687), not anything on the NTP block, so a project with two NTP blocks counts twice on one day.
  • Credited to the NTP block's submitter (OSC 2026). In October 2026, 2 of 90 rows had no user and drop out.
  • A step with no user recorded is left out (QuickSight's is not one of [" "] filter), so the board's total can run under the steps actually done.
  • This Week and Last Week run Monday to Sunday in Lumen; QuickSight's ran Sunday to Saturday, so a Sunday's steps land a week later in Lumen.
  • Lumen leaves test accounts out of every step (the dataset SQL's notTestAccount); its dataset guide still says test projects are included except in Permitting and Field Audit, which is stale.
  • Not the Weekly KPI Report's Project Closed (row 4), which counts projects, once each.

Scope Reviews Completed

Ops Leaderboards Scope board: This Week to Date, Last Week, Month to Date and Selected Range columns · target none

Also called: Scope; Scope Review Completed; scope_review_completed_by

Definition: Full scope reviews completed per person, by the scope review block's completed date.

SQL
select count(*) as value
from data_map_1.dm_pb_5_data n  -- Scope Review blocks (PB 5)
left join phoenix.user_position up on up.id = n.osc_452  -- Scope Review Completed By
left join phoenix.user u on u.id = up.user_id
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_451::date between :start_date and :end_date
  and concat(u.first_name, ' ', u.last_name) <> ' '  -- a named user
  and coalesce(n.osc_10138, false) = false  -- not closed as a PDF edit  -- Scope Review Completed

Pitfalls:

  • Lumen counts a review closed by PDF Edit Complete (PDF Edit Only, OSC 10138, from 2026-11-21) in its own PDF Edits column; QuickSight has no such field, so its Scope Review Completed counts them too (Brendan accepted, 2026-11-30).
  • By the block's completed date (OSC 451) per named person, from 2026-01; the Engineering Dashboard's Scope Review Blocks Done uses the first close in Phoenix's block audit from 2026-02-15 (Conflict 39).
  • A step with no user recorded is left out (QuickSight's is not one of [" "] filter), so the board's total can run under the steps actually done.
  • This Week and Last Week run Monday to Sunday in Lumen; QuickSight's ran Sunday to Saturday, so a Sunday's steps land a week later in Lumen.

Scope Review PDF Edits

Ops Leaderboards Scope board: PDF Edits column, over the Selected Range only · target undefined

Also called: PDF Edits

Definition: Scope reviews a person closed as a PDF edit of the existing plan set rather than a full review.

SQL
select count(*) as value
from data_map_1.dm_pb_5_data n  -- Scope Review blocks (PB 5)
left join phoenix.user_position up on up.id = n.osc_452  -- Scope Review Completed By
left join phoenix.user u on u.id = up.user_id
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_451::date between :start_date and :end_date
  and concat(u.first_name, ' ', u.last_name) <> ' '  -- a named user
  and n.osc_10138 = true  -- PDF Edit Only checked  -- Scope Review Completed

Pitfalls:

  • Lumen's own column, possible only from 2026-11-21 when Albatross added PDF Edit Only (OSC 10138), so October 2026 reads 0.
  • A step with no user recorded is left out (QuickSight's is not one of [" "] filter), so the board's total can run under the steps actually done.

QC Completed

Ops Leaderboards QC board: This Week to Date, Last Week, Month to Date and Selected Range columns · target none

Also called: QC; QC Review; qc_completed_by

Definition: Plan set QC reviews completed per person, by the plan set block's QC completed date.

SQL
select count(*) as value
from data_map_1.dm_pb_6_data n  -- Plan Set blocks (PB 6)
left join phoenix.user_position up on up.id = n.osc_471  -- QC Completed By
left join phoenix.user u on u.id = up.user_id
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_470::date between :start_date and :end_date
  and concat(u.first_name, ' ', u.last_name) <> ' '  -- a named user  -- QC Completed

Pitfalls:

  • Every QC completion on a plan set block, passed or failed, Fresh and Revision alike; the Engineering Dashboard's QC pass rates read the first close in the block audit instead (Conflict 39).
  • A step with no user recorded is left out (QuickSight's is not one of [" "] filter), so the board's total can run under the steps actually done.
  • This Week and Last Week run Monday to Sunday in Lumen; QuickSight's ran Sunday to Saturday, so a Sunday's steps land a week later in Lumen.

NEM Decided

Ops Leaderboards NEM board: This Week to Date, Last Week, Month to Date and Selected Range columns · target none

Also called: NEM; NEM Approved and NEM Rejected; nem_submitted_by

Definition: NEM applications a person submitted that the utility approved or rejected, by the approved date, else the rejected date.

SQL
select count(*) as value
from data_map_1.dm_pb_18_data n  -- NEM Application blocks (PB 18)
left join phoenix.user_position up on up.id = n.osc_2027  -- NEM Submitted By
left join phoenix.user u on u.id = up.user_id
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1206, n.osc_1207)::date between :start_date and :end_date
  and concat(u.first_name, ' ', u.last_name) <> ' '  -- a named user
  and n.osc_1200 is not null  -- Submitted to Utility  -- NEM Approved, else Rejected

Pitfalls:

  • QuickSight prints NEM Approved and NEM Rejected counts and an approval rate per person; Lumen keeps one count of decisions. A block with both dates counts once here, twice in QuickSight's two columns. It also prints an Attributable Approval % (rejections with Utilities, list value 718).
  • QuickSight's This Month, Last Week and This Week NEM tables filter on the submitted date, not the decided date, and its This Week table is set to the previous week, so it repeats Last Week; only the Custom Date table uses the decided date Lumen uses (accepted in the twin).
  • Same blocks as the Engineering Dashboard's NEM Overall Pass Rate denominator but only those with a named submitter.
  • A step with no user recorded is left out (QuickSight's is not one of [" "] filter), so the board's total can run under the steps actually done.
  • This Week and Last Week run Monday to Sunday in Lumen; QuickSight's ran Sunday to Saturday, so a Sunday's steps land a week later in Lumen.

Installs Scheduled (Day Booked)

Ops Leaderboards Installations Scheduled board: This Week to Date, Last Week, Month to Date and Selected Range columns · target none

Also called: Installations Scheduled; install_scheduled_by

Definition: Install appointments a person booked, by the day they booked it (Date Install Was Scheduled).

SQL
select count(*) as value
from data_map_1.dm_ev_41_data n  -- Installation events (event 41)
left join phoenix.user_position up on up.id = n.osc_2039  -- Install Scheduled By
left join phoenix.user u on u.id = up.user_id
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_2594::date between :start_date and :end_date  -- the day it was scheduled

Pitfalls:

  • Counts appointments by the day they were booked, canceled ones and reschedules included; the Weekly KPI Report's Installs Scheduled (row 47) counts projects with an appointment starting in the week, and Crew Capacity's Events Scheduled counts projects (Conflict 39).
  • Keeps appointments with no scheduler in the count (as QuickSight does), though a blank user gets no board row.
  • This Week and Last Week run Monday to Sunday in Lumen; QuickSight's ran Sunday to Saturday, so a Sunday's steps land a week later in Lumen.

Field Audits Completed

Ops Leaderboards Field Audit board: This Week to Date, Last Week, Month to Date and Selected Range columns · target none
Ops Leaderboards Field Audit by Kind board: Total column (Selected Range) · target none

Also called: Field Audit; Audits Completed; Total Audits Complete

Definition: Install, ESC, correction and service appointments a person field audited, each dated by the last change to its audit result.

SQL
select count(*) as value
from (select 'Install' as kind, e.project_id, e.project_process_block_event_id as event_id, 639 as component,
      u.first_name, u.last_name
    from data_map_1.dm_ev_41_data e  -- Installation events: Field Audit Completed By
    left join phoenix.user_position up on up.id = e.osc_1172
    left join phoenix.user u on u.id = up.user_id
  union all
  select 'ESC', e.project_id, e.project_process_block_event_id, 1087, u.first_name, u.last_name
    from data_map_1.dm_ev_43_data e left join phoenix.user u on u.id = e.modified_by_id  -- last editor
  union all
  select 'Correction', e.project_id, e.project_process_block_event_id, 1089, u.first_name, u.last_name
    from data_map_1.dm_ev_44_data e left join phoenix.user u on u.id = e.modified_by_id
  union all
  select 'Service', e.project_id, e.project_process_block_event_id, 1091, u.first_name, u.last_name
    from data_map_1.dm_ev_45_data e left join phoenix.user u on u.id = e.modified_by_id) n
join (select distinct on (a.project_process_block_event_id, a.object_section_component_id)
      a.project_process_block_event_id, a.object_section_component_id, a.date_modified as changed_at
    from phoenix.project_process_block_event_component_entry_audit a
    where a.object_section_component_id in (639, 1087, 1089, 1091)  -- the four audit result fields
    order by a.project_process_block_event_id, a.object_section_component_id, a.date_modified desc) ch  -- its last change
  on ch.project_process_block_event_id = n.event_id and ch.object_section_component_id = n.component
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and ch.changed_at::date between :start_date and :end_date
  and concat(n.first_name, ' ', n.last_name) <> ' '  -- a named user

Pitfalls:

  • One row per audited appointment, dated by the last change to its audit result field (OSC 639 install, 1087 ESC, 1089 correction, 1091 service), so re-editing a result moves the audit to the later day.
  • Install audits are credited to the Field Audit Completed By field (OSC 1172); ESC, correction and service audits to the appointment's last editor, since those events have no auditor field (an open question in the old draft).
  • Archived projects' audits count: the SQL blanks Test Account on an archived project and the filter keeps blanks. The SQL comment says archived projects drop; they don't.
  • Not the Weekly KPI Report's Field Audit Completion % (row 53), which counts installs verified with an auditor set (Conflict 39).
  • A step with no user recorded is left out (QuickSight's is not one of [" "] filter), so the board's total can run under the steps actually done.
  • This Week and Last Week run Monday to Sunday in Lumen; QuickSight's ran Sunday to Saturday, so a Sunday's steps land a week later in Lumen.
  • Lumen leaves test accounts out of every step (the dataset SQL's notTestAccount); its dataset guide still says test projects are included except in Permitting and Field Audit, which is stale.

Field Audits by Kind

Ops Leaderboards Field Audit by Kind board: Install, ESC, Correction and Service columns (Selected Range) · target none

Also called: Install Audits Complete; ESC Audits Complete; Correction Audits Complete; Service Audits Complete

Definition: Field audits completed by named people, split by appointment kind: Install, ESC, Correction and Service.

SQL
select n.kind as category, count(*) as value
from (select 'Install' as kind, e.project_id, e.project_process_block_event_id as event_id, 639 as component,
      u.first_name, u.last_name
    from data_map_1.dm_ev_41_data e  -- Installation events: Field Audit Completed By
    left join phoenix.user_position up on up.id = e.osc_1172
    left join phoenix.user u on u.id = up.user_id
  union all
  select 'ESC', e.project_id, e.project_process_block_event_id, 1087, u.first_name, u.last_name
    from data_map_1.dm_ev_43_data e left join phoenix.user u on u.id = e.modified_by_id  -- last editor
  union all
  select 'Correction', e.project_id, e.project_process_block_event_id, 1089, u.first_name, u.last_name
    from data_map_1.dm_ev_44_data e left join phoenix.user u on u.id = e.modified_by_id
  union all
  select 'Service', e.project_id, e.project_process_block_event_id, 1091, u.first_name, u.last_name
    from data_map_1.dm_ev_45_data e left join phoenix.user u on u.id = e.modified_by_id) n
join (select distinct on (a.project_process_block_event_id, a.object_section_component_id)
      a.project_process_block_event_id, a.object_section_component_id, a.date_modified as changed_at
    from phoenix.project_process_block_event_component_entry_audit a
    where a.object_section_component_id in (639, 1087, 1089, 1091)  -- the four audit result fields
    order by a.project_process_block_event_id, a.object_section_component_id, a.date_modified desc) ch  -- its last change
  on ch.project_process_block_event_id = n.event_id and ch.object_section_component_id = n.component
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and ch.changed_at::date between :start_date and :end_date
  and concat(n.first_name, ' ', n.last_name) <> ' '  -- a named user
group by 1
order by 1

Pitfalls:

  • Lumen splits by kind over the page's range only; QuickSight's month and week tables carry the kind columns too (accepted).
  • ESC, Correction and Service are credited to the appointment's last editor, not an auditor.

ESC Scheduled (Day Booked)

Ops Leaderboards Non Standard board: This Week to Date, Last Week, Month to Date and Selected Range columns · target none

Also called: Non Standard; ESC Scheduled; esc_scheduled_by

Definition: Non-standard (ESC) appointments a person booked, by the day they booked it.

SQL
select count(*) as value
from data_map_1.dm_ev_43_data n  -- ESC events (event 43)
left join phoenix.user_position up on up.id = n.osc_2042  -- ESC Scheduled By
left join phoenix.user u on u.id = up.user_id
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_2595::date between :start_date and :end_date  -- the day it was scheduled

Pitfalls:

  • Keeps appointments with no scheduler in the count, as QuickSight does.
  • QuickSight's sheet also filters on entity_case_category and ticket_type, columns its dataset lacks, so those filters select nothing (open question).
  • This Week and Last Week run Monday to Sunday in Lumen; QuickSight's ran Sunday to Saturday, so a Sunday's steps land a week later in Lumen.

M1 Decided

Ops Leaderboards M1 board: This Week to Date, Last Week, Month to Date and Selected Range columns · target none

Also called: M1; M1 Approved and M1 Rejected; m1_submitted_by

Definition: M1 packages a person submitted that the financier approved or rejected, by the approved date, else the rejected date.

SQL
select count(*) as value
from data_map_1.dm_pb_26_data n  -- M1 Funding blocks (PB 26)
left join phoenix.user_position up on up.id = coalesce(n.osc_2031, n.osc_2244)  -- M1 Submitted By, else OSC 2244
left join phoenix.user u on u.id = up.user_id
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1161, n.osc_1468)::date between :start_date and :end_date
  and concat(u.first_name, ' ', u.last_name) <> ' '  -- a named user  -- M1 Approved, else Rejected

Pitfalls:

  • QuickSight prints M1 Approved and M1 Rejected counts and an approval rate per person; Lumen keeps one count of decisions. A block with both dates counts once here, twice in QuickSight's two columns.
  • Dated by the approved date first; the Install Crew Leaderboard's M1 Date takes the rejected date first (Conflict 8).
  • Credited to M1 Submitted By (OSC 2031), else OSC 2244, a field the old draft could not name.
  • 6 of October 2026's 475 decided M1 blocks had no user and drop out.
  • A step with no user recorded is left out (QuickSight's is not one of [" "] filter), so the board's total can run under the steps actually done.
  • This Week and Last Week run Monday to Sunday in Lumen; QuickSight's ran Sunday to Saturday, so a Sunday's steps land a week later in Lumen.

Inspections Scheduled (Day Booked)

Ops Leaderboards Inspections Scheduled board: This Week to Date, Last Week, Month to Date and Selected Range columns · target none

Also called: Inspections Scheduled; inspection_scheduled_by

Definition: Final inspection appointments a person booked, by the day they booked it.

SQL
select count(*) as value
from data_map_1.dm_ev_42_data n  -- Final Inspection events (event 42)
left join phoenix.user_position up on up.id = n.osc_2040  -- Inspection Scheduled By
left join phoenix.user u on u.id = up.user_id
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_2557::date between :start_date and :end_date  -- the day it was scheduled

Pitfalls:

  • By the day booked (OSC 2557). The Operations Dashboard's Inspections Scheduled (Appointment Day) counts inspections by their start time instead.
  • Keeps appointments with no scheduler in the count, as QuickSight does.
  • This Week and Last Week run Monday to Sunday in Lumen; QuickSight's ran Sunday to Saturday, so a Sunday's steps land a week later in Lumen.

PTO Decided

Ops Leaderboards PTO board: This Week to Date, Last Week, Month to Date and Selected Range columns · target none

Also called: PTO; PTO Approved and PTO Rejected; pto_submitted_by

Definition: PTO applications a person submitted that the utility approved or rejected, by the approved date, else the rejected date.

SQL
select count(*) as value
from data_map_1.dm_pb_28_data n  -- PTO blocks (PB 28)
left join phoenix.user_position up on up.id = n.osc_2035  -- PTO Submitted By
left join phoenix.user u on u.id = up.user_id
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1226, n.osc_1227)::date between :start_date and :end_date
  and concat(u.first_name, ' ', u.last_name) <> ' '  -- a named user  -- PTO Approved, else Rejected

Pitfalls:

  • QuickSight prints PTO Approved and PTO Rejected counts and an approval rate per person; Lumen keeps one count of decisions. A block with both dates counts once here, twice in QuickSight's two columns.
  • QuickSight's PTO month and week tables filter on both the submitted and the decided date (each in the period), so they show fewer rows than Lumen.
  • No PTO Submitted date needed, unlike the Engineering Dashboard's PTO rates.
  • A step with no user recorded is left out (QuickSight's is not one of [" "] filter), so the board's total can run under the steps actually done.
  • This Week and Last Week run Monday to Sunday in Lumen; QuickSight's ran Sunday to Saturday, so a Sunday's steps land a week later in Lumen.

M2 Decided

Ops Leaderboards M2 board: This Week to Date, Last Week, Month to Date and Selected Range columns · target none

Also called: M2; M2 Approved and M2 Rejected; m2_submitted_by

Definition: M2 packages a person submitted that the financier approved or rejected, by the rejected date, else the approved date.

SQL
select count(*) as value
from data_map_1.dm_pb_27_data n  -- M2 Funding blocks (PB 27)
left join phoenix.user_position up on up.id = n.osc_2033  -- M2 Submitted By
left join phoenix.user u on u.id = up.user_id
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(n.osc_1533, case when n.osc_1257 = '0001-01-01' then null else n.osc_1257 end)::date between :start_date and :end_date
  and concat(u.first_name, ' ', u.last_name) <> ' '  -- a named user  -- M2 Rejected, else Approved

Pitfalls:

  • QuickSight prints M2 Approved and M2 Rejected counts and an approval rate per person; Lumen keeps one count of decisions. A block with both dates counts once here, twice in QuickSight's two columns.
  • Dated by the rejected date first, the opposite of M1 Decided beside it; an approved date of 0001-01-01 counts as none.
  • 95 of October 2026's 359 decided M2 blocks had no submitter and drop out.
  • A step with no user recorded is left out (QuickSight's is not one of [" "] filter), so the board's total can run under the steps actually done.
  • This Week and Last Week run Monday to Sunday in Lumen; QuickSight's ran Sunday to Saturday, so a Sunday's steps land a week later in Lumen.

Home Damage Resolved

Ops Leaderboards Home Damage board: This Week to Date, Last Week, Month to Date and Selected Range columns · target none

Also called: Home Damage; home_damage_resolved_by

Definition: Home damage cases a person resolved, by the repaired date.

SQL
select count(*) as value
from data_map_1.dm_pb_31_data n  -- Home Damage blocks (PB 31)
left join phoenix.user_position up on up.id = n.osc_2037  -- Home Damage Resolved By
left join phoenix.user u on u.id = up.user_id
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1656::date between :start_date and :end_date
  and concat(u.first_name, ' ', u.last_name) <> ' '  -- a named user  -- Home Damage Repaired

Pitfalls:

  • October 2026 had none.
  • QuickSight's sheet also filters on columns its dataset lacks, which select nothing.
  • A step with no user recorded is left out (QuickSight's is not one of [" "] filter), so the board's total can run under the steps actually done.
  • This Week and Last Week run Monday to Sunday in Lumen; QuickSight's ran Sunday to Saturday, so a Sunday's steps land a week later in Lumen.

Permits Submitted (Operations)

Operations Dashboard Permitting: Permits Submitted tile; By Agent board, Submitted · target none

Also called: Permits Submitted; Submitted

Definition: Permit submission events submitted in the range, by Permit Submitted Date.

SQL
select count(*) as value
from data_map_1.dm_ev_40_data e  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = e.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.osc_4136::date between :start_date and :end_date  -- Permit Submitted Date

Pitfalls:

  • Counts events, so a resubmission on a new event counts again. The Weekly KPI Report's Permit Submitted (row 9) counts projects by the project milestone.
  • The board ranks agents by this: the Permitting block's owner, else the event's submitter.
  • Opens on this week; Lumen's weeks run Monday to Sunday, QuickSight's Sunday to Saturday.

Permits Rejected (Operations)

Operations Dashboard Permitting: Permits Rejected tile; By Agent board, Rejected; Outcomes by Day (Rejected) · target none

Also called: Permits Rejected; Rejected

Definition: Permit submission events rejected in the range, by Permit Rejected date.

SQL
select count(*) as value
from data_map_1.dm_ev_40_data e  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = e.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.osc_1512::date between :start_date and :end_date  -- Permit Rejected

Pitfalls:

  • Dated by the rejected date, so a permit rejected and later approved still counts on its rejection day; the Engineering Dashboard's Permitting Rejections dates such an event by its approval.
  • Every permit submission event, test accounts left out; an event counts once per date it holds, so a permit rejected and later approved on the same event counts in both Approved and Rejected.

Permitting Attributable Rejections

Operations Dashboard Permitting: By Agent board, Attributable Rejections · target none

Also called: Attributable Rejections; Rejections on Permitting

Definition: Permits decided in the range whose rejection is attributed to the Permitting organization.

SQL
select count(*) as value
from data_map_1.dm_ev_40_data e  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.organization og on og.id = e.osc_514  -- Permit Rejection Attributable
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(e.osc_1511, e.osc_1512) is not null
  and coalesce(e.osc_1511, e.osc_1512)::date between :start_date and :end_date  -- approved, else rejected
  and og.organization_name = 'Permitting'  -- attributed to Permitting

Pitfalls:

  • Dated by the outcome date (approved first), so an event rejected for Permitting and later approved counts on its approval day.
  • Lumen tests the organization name equals "Permitting"; Kalen's Rejection's Permitting Rejections Attributed to the Permitting Team tests contains. Only one organization, Permitting, is ever named (checked 2026-12-03), so the two agree.
  • QuickSight's permitting_attributable also counts a rejection reason of list value 264; Lumen's reads the attribution only.

Permit Pass Rate, Permitting-Caused

Operations Dashboard Permitting: Pass Rate, Permitting-Caused tile; By Agent board, Permitting-Caused Pass Rate · target none

Also called: Attributable Approval Rate; permitting_attributable_approval_rate

Definition: Permits approved in the range over approved plus those rejected for a reason charged to Permitting, by outcome date.

SQL
select count(*) filter (where e.osc_1511 is not null)::numeric / nullif(count(*) filter (where e.osc_1511 is not null) + count(*) filter (where e.osc_1512 is not null and og.organization_name = 'Permitting'), 0) as value,
  count(*) filter (where e.osc_1511 is not null) as num, count(*) filter (where e.osc_1511 is not null) + count(*) filter (where e.osc_1512 is not null and og.organization_name = 'Permitting') as den
from data_map_1.dm_ev_40_data e  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = e.project_id
left join phoenix.organization og on og.id = e.osc_514  -- Permit Rejection Attributable
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(e.osc_1511, e.osc_1512) is not null
  and coalesce(e.osc_1511, e.osc_1512)::date between :start_date and :end_date  -- approved, else rejected

Pitfalls:

  • Approved plus Permitting-charged rejections, not all decisions, in the denominator: an event both rejected for Permitting and approved counts twice in it.
  • Kalen's Rejection's Permitting Team Pass Rate takes (decisions less Permitting-attributed) over decisions, so the two differ slightly when events hold both dates.

Permit Turnaround

Operations Dashboard Permitting: Turnaround tile; Turnaround and Time to Submit (Submitted to Outcome); Turnaround by AHJ and by Utility bars · target none

Also called: Turnaround Time; turnaround_time

Definition: Average calendar days from a permit's submission to its approval, else rejection, for permits decided in the range.

SQL
select avg(coalesce(e.osc_1511, e.osc_1512)::date - e.osc_4136::date) as value  -- calendar days
from data_map_1.dm_ev_40_data e  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = e.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and coalesce(e.osc_1511, e.osc_1512) is not null
  and coalesce(e.osc_1511, e.osc_1512)::date between :start_date and :end_date  -- approved, else rejected

Pitfalls:

  • An average, calendar days; an event with no submitted date drops out of the average but not the outcome counts.
  • Not the Weekly KPI Report's Permit Submitted → Approved, a median on project milestone dates.
  • The AHJ and utility bars are the project's AHJ (OSC 509) and utility (OSC 577), top 15.

Permit Time to Submit

Operations Dashboard Permitting: Time to Submit tile; Turnaround and Time to Submit (Event Created to Submitted) · target none

Also called: Permitting Event Time to Submit; time_to_submit

Definition: Average calendar days from the permit submission event's creation to its submission, for permits submitted in the range.

SQL
select avg(e.osc_4136::date - e.date_created::date) as value  -- calendar days
from data_map_1.dm_ev_40_data e  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = e.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.osc_4136::date between :start_date and :end_date  -- Permit Submitted Date

Pitfalls:

  • Starts at the event's creation, not when the job entered Permitting; QuickSight's Permit Started to First Permit Submitted (work-queue stints) is not ported.

Expected Permit Turnaround

Operations Dashboard Permitting: Expected Turnaround by AHJ and by Utility bars · target none

Also called: Active Permitting Turnaround; active_turnaround_time

Definition: For permits submitted in the range and not yet approved, the average calendar days from submission to the expected approval date.

SQL
select avg(e.osc_511::date - e.osc_4136::date) as value  -- calendar days to the expected date
from data_map_1.dm_ev_40_data e  -- Permit Submission events (event 40)
left join data_map_1.dm_project_data p on p.project_id = e.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.osc_4136::date between :start_date and :end_date  -- Permit Submitted Date
  and e.osc_1511 is null  -- not yet approved
  and e.osc_511 is not null  -- has an Expected Approval Date

Pitfalls:

  • A forecast typed in by the agent, not days waited. A rejected permit with an expected date still counts.

NEM Submitted (First Time)

Operations Dashboard Utilities: NEM Submitted tile; NEM by Agent board, Submitted · target none

Also called: NEM Submitted; first-time NEM submissions

Definition: First-time NEM applications submitted in the range (Submission Type First-Time or blank), on projects not canceled.

SQL
select count(*) as value
from data_map_1.dm_pb_18_data n  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
left join phoenix.list_value st on st.id = n.osc_3941  -- Submission Type
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1200 is not null  -- Submitted to Utility (the dataset's filter)
  and b.base_status <> 'CANCELED'  -- project not canceled
  and (st.list_value is null or st.list_value = 'First-Time')  -- first time, or no type
  and n.osc_1200::date between :start_date and :end_date  -- submitted

Pitfalls:

  • Counts blocks by Submitted to Utility; a blank Submission Type counts as first time.
  • Not the Weekly KPI Report's NEM Application Submitted (row 8), which counts projects by the project milestone.
  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.
  • Opens on this week; Lumen's weeks run Monday to Sunday, QuickSight's Sunday to Saturday.

NEM Resubmitted

Operations Dashboard Utilities: NEM by Agent board, Resubmitted · target none

Also called: NEM Re-submissions

Definition: NEM applications submitted in the range with Submission Type Resubmission, on projects not canceled.

SQL
select count(*) as value
from data_map_1.dm_pb_18_data n  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
left join phoenix.list_value st on st.id = n.osc_3941  -- Submission Type
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1200 is not null  -- Submitted to Utility (the dataset's filter)
  and b.base_status <> 'CANCELED'  -- project not canceled
  and st.list_value = 'Resubmission'
  and n.osc_1200::date between :start_date and :end_date  -- submitted

Pitfalls:

  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.
  • No QuickSight tile shows it alone; its board's total row does.

NEM Approved (Utilities)

Operations Dashboard Utilities: NEM Approved tile; NEM by Agent board, Approved; NEM Outcomes by Day (Approved) · target none

Also called: NEM Approved; Approvals

Definition: NEM applications approved in the range, by the approved date, on projects not canceled.

SQL
select count(*) as value
from data_map_1.dm_pb_18_data n  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1200 is not null  -- Submitted to Utility (the dataset's filter)
  and b.base_status <> 'CANCELED'  -- project not canceled
  and n.osc_1206::date between :start_date and :end_date  -- approved

Pitfalls:

  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.
  • The Engineering Dashboard's NEM Approvals counts the same blocks on the same day but keeps canceled projects.
  • Counts blocks, not projects.

NEM Rejected (Utilities)

Operations Dashboard Utilities: NEM Rejected tile; NEM by Agent board, Rejected; NEM Outcomes by Day (Rejected) · target none

Also called: NEM Rejected; Rejections

Definition: NEM applications rejected in the range, by the rejected date, on projects not canceled.

SQL
select count(*) as value
from data_map_1.dm_pb_18_data n  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1200 is not null  -- Submitted to Utility (the dataset's filter)
  and b.base_status <> 'CANCELED'  -- project not canceled
  and n.osc_1207::date between :start_date and :end_date  -- rejected

Pitfalls:

  • Dated by the rejected date, so a block rejected and later approved still counts on its rejection day.
  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.

NEM Attributable Rejections

Operations Dashboard Utilities: NEM by Agent board, Attributable Rejections · target none

Also called: Attributable Rejections

Definition: NEM applications decided in the range that were rejected and charged to the Utilities Department.

SQL
select count(*) as value
from data_map_1.dm_pb_18_data n  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1200 is not null  -- Submitted to Utility (the dataset's filter)
  and b.base_status <> 'CANCELED'  -- project not canceled
  and coalesce(n.osc_1206, n.osc_1207) is not null
  and coalesce(n.osc_1206, n.osc_1207)::date between :start_date and :end_date  -- approved, else rejected
  and n.osc_1207 is not null and 718 = any(n.osc_1490)  -- Utilities Department in NEM Rejection Attributable

Pitfalls:

  • NEM's attribution is list value 718 (Utilities Department) among NEM Rejection Attributable's picks, and only on rejected blocks.
  • Dated by the outcome date, approved first.
  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.

NEM Pass Rate (Utilities)

Operations Dashboard Utilities: NEM Pass Rate tile; NEM by Agent board, Pass Rate; the rate line on NEM Outcomes by Day · target none

Also called: NEM Pass Rate; Overall Pass Rate

Definition: Of NEM applications decided in the range, approvals over approvals plus rejections, on projects not canceled.

SQL
select count(*) filter (where n.osc_1206 is not null)::numeric / nullif(count(*) filter (where n.osc_1206 is not null) + count(*) filter (where n.osc_1207 is not null), 0) as value,
  count(*) filter (where n.osc_1206 is not null) as num, count(*) filter (where n.osc_1206 is not null) + count(*) filter (where n.osc_1207 is not null) as den
from data_map_1.dm_pb_18_data n  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1200 is not null  -- Submitted to Utility (the dataset's filter)
  and b.base_status <> 'CANCELED'  -- project not canceled
  and coalesce(n.osc_1206, n.osc_1207) is not null
  and coalesce(n.osc_1206, n.osc_1207)::date between :start_date and :end_date  -- approved, else rejected

Pitfalls:

  • A block holding both an approved and a rejected date counts once in the numerator and twice in the denominator, so this runs under the Engineering Dashboard's NEM Overall Pass Rate, which counts such a block once, as approved (Conflict 20).
  • Not the Weekly KPI Report's NEM First-Time Pass Rate, which takes each project's first outcome.
  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.

NEM Pass Rate, Utilities-Caused

Operations Dashboard Utilities: NEM Pass Rate, Utilities-Caused tile; NEM by Agent board, Utilities-Caused Pass Rate · target none

Also called: NEM Attributable Pass Rate; utilities_attributable_pass_rate

Definition: Of NEM applications decided in the range, approvals over approvals plus the rejections charged to the Utilities Department.

SQL
select count(*) filter (where n.osc_1206 is not null)::numeric / nullif(count(*) filter (where n.osc_1206 is not null) + count(*) filter (where n.osc_1207 is not null and 718 = any(n.osc_1490)), 0) as value,
  count(*) filter (where n.osc_1206 is not null) as num, count(*) filter (where n.osc_1206 is not null) + count(*) filter (where n.osc_1207 is not null and 718 = any(n.osc_1490)) as den
from data_map_1.dm_pb_18_data n  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1200 is not null  -- Submitted to Utility (the dataset's filter)
  and b.base_status <> 'CANCELED'  -- project not canceled
  and coalesce(n.osc_1206, n.osc_1207) is not null
  and coalesce(n.osc_1206, n.osc_1207)::date between :start_date and :end_date  -- approved, else rejected

Pitfalls:

  • Only Utilities Department rejections count against it, so it measures the Utilities team's own misses.
  • QuickSight's by-agent table is blank for an agent with no attributable rejection; Lumen prints the rate.
  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.

NEM Turnaround

Operations Dashboard Utilities: NEM Turnaround tile; NEM Turnaround and Time to Submit; NEM Turnaround by AHJ and by Utility bars · target none

Also called: NEM Turnaround Time

Definition: Average calendar days from NEM submission to approval, for applications approved in the range.

SQL
select avg(n.osc_1206::date - n.osc_1200::date) as value  -- calendar days
from data_map_1.dm_pb_18_data n  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1200 is not null  -- Submitted to Utility (the dataset's filter)
  and b.base_status <> 'CANCELED'  -- project not canceled
  and coalesce(n.osc_1206, n.osc_1207) is not null
  and coalesce(n.osc_1206, n.osc_1207)::date between :start_date and :end_date  -- approved, else rejected

Pitfalls:

  • Approvals only: a rejected NEM application has no turnaround, as QuickSight's NEM turnaround reads.
  • An average of calendar days; the Weekly KPI Report's NEM Submitted → NEM Approved is a median on project milestones.
  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.

NEM Time to Submit

Operations Dashboard Utilities: NEM Turnaround and Time to Submit (Created to Submitted) · target none

Also called: Time to Submit NEM

Definition: Average calendar days from the NEM block's creation to its submission, for applications submitted in the range.

SQL
select avg(n.osc_1200::date - n.date_created::date) as value  -- calendar days
from data_map_1.dm_pb_18_data n  -- NEM Application blocks (PB 18)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and n.osc_1200 is not null  -- Submitted to Utility (the dataset's filter)
  and b.base_status <> 'CANCELED'  -- project not canceled
  and n.osc_1200::date between :start_date and :end_date  -- submitted

Pitfalls:

  • Every submission, first time or resubmission.
  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.

PTO Submitted (First Time)

Operations Dashboard Utilities: PTO Submitted tile; PTO by Agent board, Submitted · target none

Also called: PTO Submitted; first-time PTO submissions

Definition: First-time PTO applications submitted in the range (Submission Type First-Time or blank), on projects not canceled.

SQL
select count(*) as value
from data_map_1.dm_pb_28_data n  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
left join phoenix.list_value st on st.id = n.osc_4535  -- Submission Type
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'  -- project not canceled
  and (st.list_value is null or st.list_value = 'First-Time')  -- first time, or no type
  and n.osc_1223::date between :start_date and :end_date  -- submitted

Pitfalls:

  • Counts blocks by PTO Submitted; a blank Submission Type counts as first time.
  • Counts applications, not projects.
  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.
  • Opens on this week; Lumen's weeks run Monday to Sunday, QuickSight's Sunday to Saturday.

PTO Resubmitted

Operations Dashboard Utilities: PTO by Agent board, Resubmitted · target none

Also called: PTO Re-submissions

Definition: PTO applications submitted in the range with Submission Type Resubmission, on projects not canceled.

SQL
select count(*) as value
from data_map_1.dm_pb_28_data n  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
left join phoenix.list_value st on st.id = n.osc_4535  -- Submission Type
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'  -- project not canceled
  and st.list_value = 'Resubmission'
  and n.osc_1223::date between :start_date and :end_date  -- submitted

Pitfalls:

  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.
  • No QuickSight tile shows it alone; its board's total row does.

PTO Approved (Utilities)

Operations Dashboard Utilities: PTO Approved tile; PTO by Agent board, Approved; PTO Outcomes by Day (Approved) · target none

Also called: PTO Approved; Approvals

Definition: PTO applications approved in the range, by the approved date, on projects not canceled.

SQL
select count(*) as value
from data_map_1.dm_pb_28_data n  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'  -- project not canceled
  and n.osc_1226::date between :start_date and :end_date  -- approved

Pitfalls:

  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.
  • The Engineering Dashboard's PTO Approvals counts the same blocks on the same day but keeps canceled projects and needs a PTO Submitted date.
  • Not the Weekly KPI Report's PTO Approved (row 19), which counts projects by the project milestone.

PTO Rejected (Utilities)

Operations Dashboard Utilities: PTO Rejected tile; PTO by Agent board, Rejected; PTO Outcomes by Day (Rejected) · target none

Also called: PTO Rejected; Rejections

Definition: PTO applications rejected in the range, by the rejected date, on projects not canceled.

SQL
select count(*) as value
from data_map_1.dm_pb_28_data n  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'  -- project not canceled
  and n.osc_1227::date between :start_date and :end_date  -- rejected

Pitfalls:

  • Dated by the rejected date, so a block rejected and later approved still counts on its rejection day.
  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.

PTO Attributable Rejections

Operations Dashboard Utilities: PTO by Agent board, Attributable Rejections · target none

Also called: Attributable Rejections

Definition: PTO applications decided in the range whose rejection attribution names the Utilities Department, whatever the outcome.

SQL
select count(*) as value
from data_map_1.dm_pb_28_data n  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'  -- project not canceled
  and coalesce(n.osc_1226, n.osc_1227) is not null
  and coalesce(n.osc_1226, n.osc_1227)::date between :start_date and :end_date  -- approved, else rejected
  and exists (select 1 from phoenix.list_value lv where lv.id = any(n.osc_1491) and lv.list_value like '%Utilities Department%')  -- PTO Rejection Attributable names Utilities Department

Pitfalls:

  • PTO's counts any decided block whose attribution names Utilities Department, an approved one included, where NEM's needs a rejection: QuickSight's two columns differ the same way.
  • Dated by the outcome date, approved first.
  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.

PTO Pass Rate (Utilities)

Operations Dashboard Utilities: PTO Pass Rate tile; PTO by Agent board, Pass Rate; the rate line on PTO Outcomes by Day · target none

Also called: PTO Pass Rate; Overall Pass Rate

Definition: Of PTO applications decided in the range, approvals over approvals plus rejections, on projects not canceled.

SQL
select count(*) filter (where n.osc_1226 is not null)::numeric / nullif(count(*) filter (where n.osc_1226 is not null) + count(*) filter (where n.osc_1227 is not null), 0) as value,
  count(*) filter (where n.osc_1226 is not null) as num, count(*) filter (where n.osc_1226 is not null) + count(*) filter (where n.osc_1227 is not null) as den
from data_map_1.dm_pb_28_data n  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'  -- project not canceled
  and coalesce(n.osc_1226, n.osc_1227) is not null
  and coalesce(n.osc_1226, n.osc_1227)::date between :start_date and :end_date  -- approved, else rejected

Pitfalls:

  • A block holding both an approved and a rejected date counts once in the numerator and twice in the denominator, so this runs under the Engineering Dashboard's PTO Overall Pass Rate, which counts such a block once, as approved (Conflict 22).
  • Not the Weekly KPI Report's PTO First-Pass Approval %, which takes each project's first outcome.
  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.

PTO Pass Rate, Utilities-Caused

Operations Dashboard Utilities: PTO Pass Rate, Utilities-Caused tile; PTO by Agent board, Utilities-Caused Pass Rate · target none

Also called: PTO Attributable Pass Rate; utilities_attributable_pass_rate

Definition: Of PTO applications decided in the range, approvals over approvals plus the rejections charged to the Utilities Department.

SQL
select count(*) filter (where n.osc_1226 is not null)::numeric / nullif(count(*) filter (where n.osc_1226 is not null) + count(*) filter (where n.osc_1227 is not null and exists (select 1 from phoenix.list_value lv where lv.id = any(n.osc_1491) and lv.list_value like '%Utilities Department%')), 0) as value,
  count(*) filter (where n.osc_1226 is not null) as num, count(*) filter (where n.osc_1226 is not null) + count(*) filter (where n.osc_1227 is not null and exists (select 1 from phoenix.list_value lv where lv.id = any(n.osc_1491) and lv.list_value like '%Utilities Department%')) as den
from data_map_1.dm_pb_28_data n  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'  -- project not canceled
  and coalesce(n.osc_1226, n.osc_1227) is not null
  and coalesce(n.osc_1226, n.osc_1227)::date between :start_date and :end_date  -- approved, else rejected

Pitfalls:

  • Only Utilities Department rejections count against it, so it measures the Utilities team's own misses.
  • QuickSight's second PTO "Rejected (Utilities Attributbale)" tile printed the overall pass rate; Lumen draws this rate there (accepted).
  • QuickSight's by-agent table is blank for an agent with no attributable rejection; Lumen prints the rate.
  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.

PTO Turnaround

Operations Dashboard Utilities: PTO Turnaround tile; PTO Turnaround and Time to Submit; PTO Turnaround by AHJ and by Utility bars · target none

Also called: PTO Turnaround Time

Definition: Average calendar days from PTO submission to approval, else rejection, for applications decided in the range.

SQL
select avg(coalesce(n.osc_1226, n.osc_1227)::date - n.osc_1223::date) as value  -- calendar days
from data_map_1.dm_pb_28_data n  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'  -- project not canceled
  and coalesce(n.osc_1226, n.osc_1227) is not null
  and coalesce(n.osc_1226, n.osc_1227)::date between :start_date and :end_date  -- approved, else rejected

Pitfalls:

  • QuickSight's PTO Turnaround Time tile has no date filter, so it averages every PTO outcome ever; Lumen's reads outcomes in the range (accepted).
  • An average of calendar days; the Weekly KPI Report's Inspection Passed → PTO Approved is a median on project milestones.
  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.

PTO Time to Submit

Operations Dashboard Utilities: PTO Turnaround and Time to Submit (Created to Submitted) · target none

Also called: Time to Submit PTO

Definition: Average calendar days from the PTO block's creation to its submission, for applications submitted in the range.

SQL
select avg(n.osc_1223::date - n.date_created::date) as value  -- calendar days
from data_map_1.dm_pb_28_data n  -- PTO blocks (PB 28)
left join data_map_1.dm_project_data p on p.project_id = n.project_id
left join phoenix.object_status o on o.id = p.object_status_id
left join phoenix.base_status b on b.id = o.base_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and b.base_status <> 'CANCELED'  -- project not canceled
  and n.osc_1223::date between :start_date and :end_date  -- submitted

Pitfalls:

  • Every submission, first time or resubmission.
  • Projects canceled today are left out of every Utilities figure, past months included, so a month's counts fall as its projects cancel: QuickSight's October 2026 NEM Submitted and Approved read 81 and 113 on 2026-11-30, and 78 and 111 on 2026-12-03.

Inspections Completed

Operations Dashboard Inspections: Inspections Completed tile; Results by Warehouse, State, Financier and Assignee boards, Completed · target none

Also called: Total Completed Inspection Count

Definition: Final inspections starting in the range that passed or failed.

SQL
select count(*) as value
from data_map_1.dm_ev_42_data i  -- Final Inspection events
left join data_map_1.dm_project_data p on p.project_id = i.project_id
left join phoenix.object_status st on st.id = i.object_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and i.start_time::date between :start_date and :end_date  -- the appointment's start
  and st.object_status in ('Inspection Passed', 'Inspection Failed')

Pitfalls:

  • By the inspection's start time (the appointment) and its status today, every event counted, repeats included; the First or Repeat filter narrows to a project's first inspection.
  • Not the Engineering Dashboard's Inspection Total Outcomes, which dates by the appointment too but calls an inspection with no failed outcome a pass.

Inspections Canceled or Called Off

Operations Dashboard Inspections: Canceled or Called Off tile · target none

Also called: Canceled/Called Off

Definition: Final inspections starting in the range now Canceled or Called Off.

SQL
select count(*) as value
from data_map_1.dm_ev_42_data i  -- Final Inspection events
left join data_map_1.dm_project_data p on p.project_id = i.project_id
left join phoenix.object_status st on st.id = i.object_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and i.start_time::date between :start_date and :end_date  -- the appointment's start
  and st.object_status in ('Called Off', 'Canceled')

Pitfalls:

  • By the inspection's start time (the appointment) and its status today, every event counted, repeats included; the First or Repeat filter narrows to a project's first inspection.

Inspections Not Yet Dispositioned

Operations Dashboard Inspections: Not Yet Dispositioned tile and table · target none

Also called: Inspections Not Yet Dispositioned

Definition: Final inspections starting in the range whose status is none of passed, failed, canceled or called off.

SQL
select count(*) as value
from data_map_1.dm_ev_42_data i  -- Final Inspection events
left join data_map_1.dm_project_data p on p.project_id = i.project_id
left join phoenix.object_status st on st.id = i.object_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and i.start_time::date between :start_date and :end_date  -- the appointment's start
  and st.object_status not in ('Called Off', 'Canceled', 'Inspection Failed', 'Inspection Passed')

Pitfalls:

  • An inspection with no status at all is not counted.
  • By the inspection's start time (the appointment) and its status today, every event counted, repeats included; the First or Repeat filter narrows to a project's first inspection.

Inspections Scheduled (Appointment Day)

Operations Dashboard Inspections: Results by Scheduler board, Scheduled · target none

Also called: Inspections Scheduled

Definition: Final inspection appointments starting in the range, any status.

SQL
select count(*) as value
from data_map_1.dm_ev_42_data i  -- Final Inspection events
left join data_map_1.dm_project_data p on p.project_id = i.project_id
left join phoenix.object_status st on st.id = i.object_status_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and i.start_time::date between :start_date and :end_date  -- the appointment's start

Pitfalls:

  • By the appointment's start, not the day it was booked; Ops Leaderboards' Inspections Scheduled (Day Booked) counts by booking day.
  • QuickSight's scheduler table totaled 384 against its drilldown's 383 in October 2026: its join returns project 27757 twice.

Failed Inspections by Reason

Operations Dashboard Inspections: Why Inspections Failed: Fails by Reason bars · target none

Also called: Inspection Fails by Reason

Definition: Failed final inspections starting in the range, one row per fail reason recorded (Final Inspection Fail Reason, OSC 727).

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_ev_42_data i  -- Final Inspection events
left join data_map_1.dm_project_data p on p.project_id = i.project_id
left join phoenix.object_status st on st.id = i.object_status_id
join phoenix.list_value lv on lv.id = any(i.osc_727)
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and i.start_time::date between :start_date and :end_date  -- the appointment's start
  and st.object_status = 'Inspection Failed'
group by 1
order by value desc

Pitfalls:

  • An inspection with two reasons counts under each; top 12 shown.
  • Failed inspections only, by start time; the Install Crew Leaderboard's Inspection Fail Reasons counts any status by end time.
  • QuickSight's pie folds small slices into Other; Lumen's bars list each reason (accepted).

Failed Inspections by Cause

Operations Dashboard Inspections: Why Inspections Failed: Fails by Cause bars · target none

Also called: Inspection Fails by Reason (attributable)

Definition: Failed final inspections starting in the range, one row per department charged (Fail Attributable (Current), OSC 2349).

SQL
select lv.list_value as category, count(*) as value
from data_map_1.dm_ev_42_data i  -- Final Inspection events
left join data_map_1.dm_project_data p on p.project_id = i.project_id
left join phoenix.object_status st on st.id = i.object_status_id
join phoenix.list_value lv on lv.id = any(i.osc_2349)
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and i.start_time::date between :start_date and :end_date  -- the appointment's start
  and st.object_status = 'Inspection Failed'
group by 1
order by value desc

Pitfalls:

  • QuickSight's attributable pie has no failed-status filter, so it also counts passed and canceled inspections that carry an attribution; Lumen counts failed ones only (accepted).
  • The Install Crew Leaderboard's Inspection Fail Attributable Department counts any status by end time.

Pre-Inspection Audits

Operations Dashboard Inspections: Audits by Agent board, Pre-Inspection · target none

Also called: Pre-Inspection Audits by Agent

Definition: Final inspections whose pre-inspection audit result was first filled in during the range.

SQL
select count(*) as value
from (select distinct on (a.project_process_block_event_id) a.project_process_block_event_id,
      coalesce(a.changed_at, a.date_created) as filled_at
    from phoenix.project_process_block_event_component_entry_audit a
    where a.object_section_component_id = 2556  -- Pre-Inspection Audit Result
      and a.action in ('INSERT', 'UPDATE') and a.int_value is not null
    order by a.project_process_block_event_id, coalesce(a.changed_at, a.date_created), a.id) pre  -- its first fill
join phoenix.project_process_block_event e on e.id = pre.project_process_block_event_id
left join data_map_1.dm_project_data p on p.project_id = e.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and e.event_id = 42  -- Final Inspection
  and pre.filled_at::date between :start_date and :end_date

Pitfalls:

  • Dated and credited by the first time the result was filled in; a later edit doesn't move it.

Post-Inspection Audits

Operations Dashboard Inspections: Audits by Agent board, Post-Inspection · target none

Also called: Post-Inspection Audits by Agent

Definition: Final inspections whose last post-inspection button click (Inspection Passed, No Others Needed; Passed, Schedule Another; Failed or Partial Pass) fell in the range.

SQL
select count(*) as value
from (select ch.project_process_block_event_id, ch.project_id, max(ch.date_created) as clicked_at
    from phoenix.control_history ch  -- buttons on the Final Inspection event
    where ch.control_id in (345, 254, 255)  -- the post-inspection buttons
      and ch.eval_passed and ch.error is null
      and ch.date_created >= :start_date  -- clicks since the range began: an event's last click in the range is its last since then
    group by 1, 2) post  -- each event's last click
left join data_map_1.dm_project_data p on p.project_id = post.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and post.clicked_at::date between :start_date and :end_date

Pitfalls:

  • Dated and credited by the last click, so a second click moves the audit to the later day and agent.
  • QuickSight counted Brooke Muhlestein's audit of project 27757 twice in October 2026 (its join duplicates the project).

Placards Printed

Operations Dashboard Inspections: Audits and Placards: Placards Printed bars, by printed by · target none

Also called: Placards Printed by User by Date

Definition: Placard blocks printed in the range, by Printed Date.

SQL
select count(*) as value
from data_map_1.dm_pb_51_data pl  -- Placard blocks (PB 51)
left join data_map_1.dm_project_data p on p.project_id = pl.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and pl.osc_3929::date between :start_date and :end_date  -- Printed Date

Pitfalls:

  • Counts placard blocks, not placards: Placards Needed (OSC 4311) is not summed.

Deal Review Actions

Operations Dashboard Deal Review: Deal Review Actions (summary); Actions by Day bars · target none

Also called: Actions; Deal Review QC

Definition: Clicks of the sheet's 16 Deal Review actions in the range, plus change orders signed.

SQL
select sum(a.clicks) as value
from (select trim(c.description) as button, coalesce(pb.process_block_name, e.event_name) as block,
      k.project_id, k.clicks
    from (select ch.control_id, ch.project_id, count(*) as clicks
        from phoenix.control_history ch  -- the sheet's buttons, clicks that ran
        where ch.eval_passed = true
          and ch.control_id in (201, 203, 1075, 846, 848, 387, 466, 467, 321, 323, 1138, 1133, 263, 264, 751, 750, 798, 802, 524, 525)
          and ch.date_created >= :start_date and ch.date_created < :end_date::date + 1  -- clicked in the range
        group by 1, 2) k
    join phoenix.control c on c.id = k.control_id
    left join phoenix.process_block pb on pb.id = c.process_block_id
    left join phoenix.event e on e.id = c.event_id
  union all
  select 'Change Order Signed', 'Change Order', ppb.project_id, 1
    from phoenix.project_process_block_component_entry ce  -- Change Order Signed date (component 1007)
    join phoenix.project_process_block ppb on ppb.id = ce.project_process_block_id
    where ce.object_section_component_id = 1007 and ce.timestamp_value is not null and ce.archived = false
      and coalesce(ce.date_modified, ce.date_created)::date between :start_date and :end_date) a
cross join lateral (select case
    when a.button = 'Verification Complete' then 'Verification Complete'
    when a.button in ('Approved', 'Approved with Stipulations') and a.block = 'M0 (NTP) Funding' then 'M0 Approved'
    when a.button in ('Welcome Call Passed', 'Welcome Call Failed') then 'Welcome Calls'
    when a.button in ('Consumption Validation Passed', 'Consumption Validation Failed') then 'Consumption Validations'
    when a.button = 'Scheduled' and a.block = 'Site Survey Appointment' then 'Site Surveys Scheduled'
    when a.button = 'DR Audit Passed' then 'Site Surveys Verified'
    when a.button = 'Missing Documents' then 'Marked Missing Documents'
    when a.button = 'Finance Docs Sent' then 'Finance Docs Sent'
    when a.button = 'Change Order Signed' then 'Change Orders Signed'
    when a.button = 'NTP Approved' then 'NTP Verified'
    when a.button = 'Submitted' and a.block = 'PPCR' then 'PPCR Submitted'
    when a.button = 'Approved' and a.block = 'PPCR' then 'PPCR Approved'
    when a.button in ('Missing Documents Verification Complete', 'Missing Documents Uploaded (auto)') then 'Missing Documents Received'
    when a.button = 'All Needed Items Obtained' then 'Extended Reviews Completed'
    when a.button = 'Hold Resolved' then 'Holds Resolved'
    when a.button = 'Stips Resolved' then 'Stips Resolved'
  end as action) x  -- the first action the click matches
left join data_map_1.dm_project_data p on p.project_id = a.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.action is not null

Pitfalls:

  • Counts button clicks that ran (eval passed), by when they were clicked, so clicking the same button twice on one project counts twice.
  • Change Orders Signed is the Change Order Signed date on the block, not a click: one per block, dated by the entry's last edit, so re-signing moves it rather than adding one.
  • Opens on this week; Lumen's weeks run Monday to Sunday, QuickSight's Sunday to Saturday.

Deal Review Actions by Action

Operations Dashboard Deal Review: Deal Review by Agent board (Verifications, Docs Marked Missing, Docs Received, Extended Reviews, Holds Resolved) · target none
Operations Dashboard Deal Review: Welcome Calls and Consumption by Agent board (Welcome Calls, Consumption Validations) · target none
Operations Dashboard Deal Review: Funding by Agent board (M0 Approved, Stips Resolved, NTP Verified, Finance Docs Sent) · target none
Operations Dashboard Deal Review: Change Orders, PPCR and Site Surveys by Agent board · target none
Operations Dashboard Deal Review: Verification Complete, M0 Approved and NTP Verified (summary); Actions by Type bars · target none

Also called: Verification Complete; M0 Approved; Welcome Calls; Consumption Validations; Site Surveys Scheduled; Site Surveys Verified; Marked Missing Documents; Finance Docs Sent; Change Orders Signed; NTP Verified; PPCR Submitted; PPCR Approved; Missing Documents Received; Extended Reviews Completed; Holds Resolved; Stips Resolved

Definition: Clicks in the range of each of the 16 Deal Review actions, one row per action.

SQL
select x.action as category, sum(a.clicks) as value
from (select trim(c.description) as button, coalesce(pb.process_block_name, e.event_name) as block,
      k.project_id, k.clicks
    from (select ch.control_id, ch.project_id, count(*) as clicks
        from phoenix.control_history ch  -- the sheet's buttons, clicks that ran
        where ch.eval_passed = true
          and ch.control_id in (201, 203, 1075, 846, 848, 387, 466, 467, 321, 323, 1138, 1133, 263, 264, 751, 750, 798, 802, 524, 525)
          and ch.date_created >= :start_date and ch.date_created < :end_date::date + 1  -- clicked in the range
        group by 1, 2) k
    join phoenix.control c on c.id = k.control_id
    left join phoenix.process_block pb on pb.id = c.process_block_id
    left join phoenix.event e on e.id = c.event_id
  union all
  select 'Change Order Signed', 'Change Order', ppb.project_id, 1
    from phoenix.project_process_block_component_entry ce  -- Change Order Signed date (component 1007)
    join phoenix.project_process_block ppb on ppb.id = ce.project_process_block_id
    where ce.object_section_component_id = 1007 and ce.timestamp_value is not null and ce.archived = false
      and coalesce(ce.date_modified, ce.date_created)::date between :start_date and :end_date) a
cross join lateral (select case
    when a.button = 'Verification Complete' then 'Verification Complete'
    when a.button in ('Approved', 'Approved with Stipulations') and a.block = 'M0 (NTP) Funding' then 'M0 Approved'
    when a.button in ('Welcome Call Passed', 'Welcome Call Failed') then 'Welcome Calls'
    when a.button in ('Consumption Validation Passed', 'Consumption Validation Failed') then 'Consumption Validations'
    when a.button = 'Scheduled' and a.block = 'Site Survey Appointment' then 'Site Surveys Scheduled'
    when a.button = 'DR Audit Passed' then 'Site Surveys Verified'
    when a.button = 'Missing Documents' then 'Marked Missing Documents'
    when a.button = 'Finance Docs Sent' then 'Finance Docs Sent'
    when a.button = 'Change Order Signed' then 'Change Orders Signed'
    when a.button = 'NTP Approved' then 'NTP Verified'
    when a.button = 'Submitted' and a.block = 'PPCR' then 'PPCR Submitted'
    when a.button = 'Approved' and a.block = 'PPCR' then 'PPCR Approved'
    when a.button in ('Missing Documents Verification Complete', 'Missing Documents Uploaded (auto)') then 'Missing Documents Received'
    when a.button = 'All Needed Items Obtained' then 'Extended Reviews Completed'
    when a.button = 'Hold Resolved' then 'Holds Resolved'
    when a.button = 'Stips Resolved' then 'Stips Resolved'
  end as action) x  -- the first action the click matches
left join data_map_1.dm_project_data p on p.project_id = a.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.action is not null
group by 1
order by value desc

Pitfalls:

  • M0 Approved counts Approved or Approved with Stipulations in the M0 (NTP) Funding block; Approved in PPCR is PPCR Approved. NTP Verified is the NTP Approved button.
  • Not the Weekly KPI Report's M0 Approved (row 20) or Project Closed (row 4), which count projects by milestone date: these count clicks.
  • Welcome Calls and Consumption Validations count passed and failed clicks together.
  • Counts button clicks that ran (eval passed), by when they were clicked, so clicking the same button twice on one project counts twice.

Welcome Call Pass Rate

Operations Dashboard Deal Review: Welcome Call Pass Rate (summary); Welcome Calls and Consumption by Agent, Welcome Call Pass Rate · target none

Also called: Welcome Calls Completed (Pass/Fail)

Definition: Welcome Call Passed clicks over Passed plus Failed clicks in the range.

SQL
select coalesce(sum(a.clicks) filter (where a.button = 'Welcome Call Passed'), 0)::numeric / nullif(coalesce(sum(a.clicks) filter (where a.button = 'Welcome Call Passed'), 0) + coalesce(sum(a.clicks) filter (where a.button = 'Welcome Call Failed'), 0), 0) as value,
  coalesce(sum(a.clicks) filter (where a.button = 'Welcome Call Passed'), 0) as num, coalesce(sum(a.clicks) filter (where a.button = 'Welcome Call Passed'), 0) + coalesce(sum(a.clicks) filter (where a.button = 'Welcome Call Failed'), 0) as den
from (select trim(c.description) as button, coalesce(pb.process_block_name, e.event_name) as block,
      k.project_id, k.clicks
    from (select ch.control_id, ch.project_id, count(*) as clicks
        from phoenix.control_history ch  -- the sheet's buttons, clicks that ran
        where ch.eval_passed = true
          and ch.control_id in (201, 203, 1075, 846, 848, 387, 466, 467, 321, 323, 1138, 1133, 263, 264, 751, 750, 798, 802, 524, 525)
          and ch.date_created >= :start_date and ch.date_created < :end_date::date + 1  -- clicked in the range
        group by 1, 2) k
    join phoenix.control c on c.id = k.control_id
    left join phoenix.process_block pb on pb.id = c.process_block_id
    left join phoenix.event e on e.id = c.event_id
  union all
  select 'Change Order Signed', 'Change Order', ppb.project_id, 1
    from phoenix.project_process_block_component_entry ce  -- Change Order Signed date (component 1007)
    join phoenix.project_process_block ppb on ppb.id = ce.project_process_block_id
    where ce.object_section_component_id = 1007 and ce.timestamp_value is not null and ce.archived = false
      and coalesce(ce.date_modified, ce.date_created)::date between :start_date and :end_date) a
cross join lateral (select case
    when a.button = 'Verification Complete' then 'Verification Complete'
    when a.button in ('Approved', 'Approved with Stipulations') and a.block = 'M0 (NTP) Funding' then 'M0 Approved'
    when a.button in ('Welcome Call Passed', 'Welcome Call Failed') then 'Welcome Calls'
    when a.button in ('Consumption Validation Passed', 'Consumption Validation Failed') then 'Consumption Validations'
    when a.button = 'Scheduled' and a.block = 'Site Survey Appointment' then 'Site Surveys Scheduled'
    when a.button = 'DR Audit Passed' then 'Site Surveys Verified'
    when a.button = 'Missing Documents' then 'Marked Missing Documents'
    when a.button = 'Finance Docs Sent' then 'Finance Docs Sent'
    when a.button = 'Change Order Signed' then 'Change Orders Signed'
    when a.button = 'NTP Approved' then 'NTP Verified'
    when a.button = 'Submitted' and a.block = 'PPCR' then 'PPCR Submitted'
    when a.button = 'Approved' and a.block = 'PPCR' then 'PPCR Approved'
    when a.button in ('Missing Documents Verification Complete', 'Missing Documents Uploaded (auto)') then 'Missing Documents Received'
    when a.button = 'All Needed Items Obtained' then 'Extended Reviews Completed'
    when a.button = 'Hold Resolved' then 'Holds Resolved'
    when a.button = 'Stips Resolved' then 'Stips Resolved'
  end as action) x  -- the first action the click matches
left join data_map_1.dm_project_data p on p.project_id = a.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.action is not null
  and x.action = 'Welcome Calls'

Pitfalls:

  • Clicks, not customers: a failed call redone and passed counts one fail and one pass.
  • Lumen's own rate: QuickSight's Welcome Calls Completed (Pass/Fail) chart stacks passed and failed clicks together by agent and day, with no rate.
  • October 2026: 94 passed of 97.

Consumption Validation Pass Rate

Operations Dashboard Deal Review: Consumption Validation Pass Rate (summary); Welcome Calls and Consumption by Agent, Consumption Pass Rate · target none

Also called: Consumption Validation (Pass/Fail)

Definition: Consumption Validation Passed clicks over Passed plus Failed clicks in the range.

SQL
select coalesce(sum(a.clicks) filter (where a.button = 'Consumption Validation Passed'), 0)::numeric / nullif(coalesce(sum(a.clicks) filter (where a.button = 'Consumption Validation Passed'), 0) + coalesce(sum(a.clicks) filter (where a.button = 'Consumption Validation Failed'), 0), 0) as value,
  coalesce(sum(a.clicks) filter (where a.button = 'Consumption Validation Passed'), 0) as num, coalesce(sum(a.clicks) filter (where a.button = 'Consumption Validation Passed'), 0) + coalesce(sum(a.clicks) filter (where a.button = 'Consumption Validation Failed'), 0) as den
from (select trim(c.description) as button, coalesce(pb.process_block_name, e.event_name) as block,
      k.project_id, k.clicks
    from (select ch.control_id, ch.project_id, count(*) as clicks
        from phoenix.control_history ch  -- the sheet's buttons, clicks that ran
        where ch.eval_passed = true
          and ch.control_id in (201, 203, 1075, 846, 848, 387, 466, 467, 321, 323, 1138, 1133, 263, 264, 751, 750, 798, 802, 524, 525)
          and ch.date_created >= :start_date and ch.date_created < :end_date::date + 1  -- clicked in the range
        group by 1, 2) k
    join phoenix.control c on c.id = k.control_id
    left join phoenix.process_block pb on pb.id = c.process_block_id
    left join phoenix.event e on e.id = c.event_id
  union all
  select 'Change Order Signed', 'Change Order', ppb.project_id, 1
    from phoenix.project_process_block_component_entry ce  -- Change Order Signed date (component 1007)
    join phoenix.project_process_block ppb on ppb.id = ce.project_process_block_id
    where ce.object_section_component_id = 1007 and ce.timestamp_value is not null and ce.archived = false
      and coalesce(ce.date_modified, ce.date_created)::date between :start_date and :end_date) a
cross join lateral (select case
    when a.button = 'Verification Complete' then 'Verification Complete'
    when a.button in ('Approved', 'Approved with Stipulations') and a.block = 'M0 (NTP) Funding' then 'M0 Approved'
    when a.button in ('Welcome Call Passed', 'Welcome Call Failed') then 'Welcome Calls'
    when a.button in ('Consumption Validation Passed', 'Consumption Validation Failed') then 'Consumption Validations'
    when a.button = 'Scheduled' and a.block = 'Site Survey Appointment' then 'Site Surveys Scheduled'
    when a.button = 'DR Audit Passed' then 'Site Surveys Verified'
    when a.button = 'Missing Documents' then 'Marked Missing Documents'
    when a.button = 'Finance Docs Sent' then 'Finance Docs Sent'
    when a.button = 'Change Order Signed' then 'Change Orders Signed'
    when a.button = 'NTP Approved' then 'NTP Verified'
    when a.button = 'Submitted' and a.block = 'PPCR' then 'PPCR Submitted'
    when a.button = 'Approved' and a.block = 'PPCR' then 'PPCR Approved'
    when a.button in ('Missing Documents Verification Complete', 'Missing Documents Uploaded (auto)') then 'Missing Documents Received'
    when a.button = 'All Needed Items Obtained' then 'Extended Reviews Completed'
    when a.button = 'Hold Resolved' then 'Holds Resolved'
    when a.button = 'Stips Resolved' then 'Stips Resolved'
  end as action) x  -- the first action the click matches
left join data_map_1.dm_project_data p on p.project_id = a.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and x.action is not null
  and x.action = 'Consumption Validations'

Pitfalls:

  • Clicks, not projects.
  • Lumen's own rate: QuickSight's Consumption Validation (Pass/Fail) chart stacks both by agent and day, with no rate.
  • October 2026: 90 passed of 97.

Inspection Pass Rate, Field-Caused

Operations Dashboard Field Audit: Inspection Pass Rate (summary); By Agent board, Inspection Pass Rate; Inspection Outcomes by Day (rate line) · target none

Also called: Inspection Pass Rate by Agent; pass_rate

Definition: Of inspection outcomes in the range, passes over passes plus fails charged to the field.

SQL
select count(*) filter (where o.outcome = 'Pass')::numeric / nullif(count(*) filter (where o.outcome = 'Pass') + count(*) filter (where o.outcome = 'Fail' and exists (select 1 from phoenix.list_value lv where lv.id = any(o.attr) and lv.list_value like '%Field%')), 0) as value,
  count(*) filter (where o.outcome = 'Pass') as num, count(*) filter (where o.outcome = 'Pass') + count(*) filter (where o.outcome = 'Fail' and exists (select 1 from phoenix.list_value lv where lv.id = any(o.attr) and lv.list_value like '%Field%')) as den
from (select 'Funding' as kind, d.project_id, d.outcome, d.at, d.attr, d.reasons
    from (select project_id, 'Fail' as outcome, osc_1468 as at, osc_1469 as attr, osc_1248 as reasons
        from data_map_1.dm_pb_26_data  -- M1 Rejected
        where archived = false and osc_1468 > date '1900-01-01' and osc_1468 <= current_date
      union all select project_id, 'Pass', osc_1161, null, null from data_map_1.dm_pb_26_data  -- M1 Approved
        where archived = false and osc_1161 > date '1900-01-01' and osc_1161 <= current_date
      union all select project_id, 'Fail', osc_1533, osc_1531, osc_1259 from data_map_1.dm_pb_27_data  -- M2 Rejected
        where archived = false and osc_1533 > date '1900-01-01' and osc_1533 <= current_date
      union all select project_id, 'Pass', osc_1257, null, null from data_map_1.dm_pb_27_data  -- M2 Approved
        where archived = false and osc_1257 > date '1900-01-01' and osc_1257 <= current_date) d
  union all
  select 'Inspection', ppbe.project_id, case i.object_status_id when 69 then 'Fail' else 'Pass' end, i.changed_at,
      case when i.object_status_id = 69 then ev.osc_2349 end, case when i.object_status_id = 69 then ev.osc_727 end
    from (select a.project_process_block_event_id, a.object_status_id, a.changed_at,
          lag(a.object_status_id) over (partition by a.project_process_block_event_id order by a.changed_at, a.id) as prev
        from phoenix.project_process_block_event_audit a where a.event_id = 42) i  -- Final Inspection status history
    join phoenix.project_process_block_event ppbe on ppbe.id = i.project_process_block_event_id
    left join data_map_1.dm_ev_42_data ev on ev.project_process_block_event_id = i.project_process_block_event_id and ev.archived = false
    where i.object_status_id in (68, 69) and i.prev is distinct from i.object_status_id) o  -- set to Passed (68) or Failed (69)
left join data_map_1.dm_project_data p on p.project_id = o.project_id and p.archived = false
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and o.kind = 'Inspection'
  and o.at::date between :start_date and :end_date  -- the outcome's day

Pitfalls:

  • An inspection outcome is each time the Final Inspection's status was set to Passed or Failed (Phoenix's event audit), so one event can pass, fail and pass again; dated by when the status changed. Attribution is the event's current Fail Attributable (OSC 2349).
  • Field-caused means the rejection attribution contains "Field", so "Field Audit" and "Field, Engineering" count as Field.
  • Each outcome is credited to whoever last clicked Ready for Funding (control 355) or Ready for Inspection (356) on or before its day; clicks start about 2026-02-14, so earlier outcomes have no agent but still count in the totals.
  • October 2026: 263 passes and 58 field-caused fails, 81.9%, against the Inspections sheet's 265 passed and 50 crew-caused fails (84.1%) for inspections starting that month.
  • Not the Operations Inspections sheet's Pass Rate, Crew-Caused, which counts inspection events by start time and status today.

Inspection Passes (Field Audit)

Operations Dashboard Field Audit: By Agent board, Inspection Pass; Inspection Outcomes by Day (Pass) · target none

Also called: Inspection Pass

Definition: Inspection outcomes in the range that passed.

SQL
select count(*) as value
from (select 'Funding' as kind, d.project_id, d.outcome, d.at, d.attr, d.reasons
    from (select project_id, 'Fail' as outcome, osc_1468 as at, osc_1469 as attr, osc_1248 as reasons
        from data_map_1.dm_pb_26_data  -- M1 Rejected
        where archived = false and osc_1468 > date '1900-01-01' and osc_1468 <= current_date
      union all select project_id, 'Pass', osc_1161, null, null from data_map_1.dm_pb_26_data  -- M1 Approved
        where archived = false and osc_1161 > date '1900-01-01' and osc_1161 <= current_date
      union all select project_id, 'Fail', osc_1533, osc_1531, osc_1259 from data_map_1.dm_pb_27_data  -- M2 Rejected
        where archived = false and osc_1533 > date '1900-01-01' and osc_1533 <= current_date
      union all select project_id, 'Pass', osc_1257, null, null from data_map_1.dm_pb_27_data  -- M2 Approved
        where archived = false and osc_1257 > date '1900-01-01' and osc_1257 <= current_date) d
  union all
  select 'Inspection', ppbe.project_id, case i.object_status_id when 69 then 'Fail' else 'Pass' end, i.changed_at,
      case when i.object_status_id = 69 then ev.osc_2349 end, case when i.object_status_id = 69 then ev.osc_727 end
    from (select a.project_process_block_event_id, a.object_status_id, a.changed_at,
          lag(a.object_status_id) over (partition by a.project_process_block_event_id order by a.changed_at, a.id) as prev
        from phoenix.project_process_block_event_audit a where a.event_id = 42) i  -- Final Inspection status history
    join phoenix.project_process_block_event ppbe on ppbe.id = i.project_process_block_event_id
    left join data_map_1.dm_ev_42_data ev on ev.project_process_block_event_id = i.project_process_block_event_id and ev.archived = false
    where i.object_status_id in (68, 69) and i.prev is distinct from i.object_status_id) o  -- set to Passed (68) or Failed (69)
left join data_map_1.dm_project_data p on p.project_id = o.project_id and p.archived = false
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and o.kind = 'Inspection'
  and o.at::date between :start_date and :end_date  -- the outcome's day
  and o.outcome = 'Pass'

Pitfalls:

  • An inspection outcome is each time the Final Inspection's status was set to Passed or Failed (Phoenix's event audit), so one event can pass, fail and pass again; dated by when the status changed. Attribution is the event's current Fail Attributable (OSC 2349).

Inspection Field-Caused Fails

Operations Dashboard Field Audit: Inspection Field-Caused Fails (summary); By Agent board, Inspection Fail; Inspection Outcomes by Day (Field-Caused Fail) · target none

Also called: Inspection Fail

Definition: Inspection outcomes in the range that failed with the field among the attribution.

SQL
select count(*) as value
from (select 'Funding' as kind, d.project_id, d.outcome, d.at, d.attr, d.reasons
    from (select project_id, 'Fail' as outcome, osc_1468 as at, osc_1469 as attr, osc_1248 as reasons
        from data_map_1.dm_pb_26_data  -- M1 Rejected
        where archived = false and osc_1468 > date '1900-01-01' and osc_1468 <= current_date
      union all select project_id, 'Pass', osc_1161, null, null from data_map_1.dm_pb_26_data  -- M1 Approved
        where archived = false and osc_1161 > date '1900-01-01' and osc_1161 <= current_date
      union all select project_id, 'Fail', osc_1533, osc_1531, osc_1259 from data_map_1.dm_pb_27_data  -- M2 Rejected
        where archived = false and osc_1533 > date '1900-01-01' and osc_1533 <= current_date
      union all select project_id, 'Pass', osc_1257, null, null from data_map_1.dm_pb_27_data  -- M2 Approved
        where archived = false and osc_1257 > date '1900-01-01' and osc_1257 <= current_date) d
  union all
  select 'Inspection', ppbe.project_id, case i.object_status_id when 69 then 'Fail' else 'Pass' end, i.changed_at,
      case when i.object_status_id = 69 then ev.osc_2349 end, case when i.object_status_id = 69 then ev.osc_727 end
    from (select a.project_process_block_event_id, a.object_status_id, a.changed_at,
          lag(a.object_status_id) over (partition by a.project_process_block_event_id order by a.changed_at, a.id) as prev
        from phoenix.project_process_block_event_audit a where a.event_id = 42) i  -- Final Inspection status history
    join phoenix.project_process_block_event ppbe on ppbe.id = i.project_process_block_event_id
    left join data_map_1.dm_ev_42_data ev on ev.project_process_block_event_id = i.project_process_block_event_id and ev.archived = false
    where i.object_status_id in (68, 69) and i.prev is distinct from i.object_status_id) o  -- set to Passed (68) or Failed (69)
left join data_map_1.dm_project_data p on p.project_id = o.project_id and p.archived = false
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and o.kind = 'Inspection'
  and o.at::date between :start_date and :end_date  -- the outcome's day
  and o.outcome = 'Fail' and exists (select 1 from phoenix.list_value lv where lv.id = any(o.attr) and lv.list_value like '%Field%')

Pitfalls:

  • An inspection outcome is each time the Final Inspection's status was set to Passed or Failed (Phoenix's event audit), so one event can pass, fail and pass again; dated by when the status changed. Attribution is the event's current Fail Attributable (OSC 2349).
  • Field-caused means the rejection attribution contains "Field", so "Field Audit" and "Field, Engineering" count as Field.

Funding Pass Rate, Field-Caused

Operations Dashboard Field Audit: Funding Pass Rate (summary); By Agent board, Funding Pass Rate; Funding Outcomes by Day (rate line) · target none

Also called: Funding Pass Rate by Agent; pass_rate

Definition: Of funding outcomes in the range, passes over passes plus fails charged to the field.

SQL
select count(*) filter (where o.outcome = 'Pass')::numeric / nullif(count(*) filter (where o.outcome = 'Pass') + count(*) filter (where o.outcome = 'Fail' and exists (select 1 from phoenix.list_value lv where lv.id = any(o.attr) and lv.list_value like '%Field%')), 0) as value,
  count(*) filter (where o.outcome = 'Pass') as num, count(*) filter (where o.outcome = 'Pass') + count(*) filter (where o.outcome = 'Fail' and exists (select 1 from phoenix.list_value lv where lv.id = any(o.attr) and lv.list_value like '%Field%')) as den
from (select 'Funding' as kind, d.project_id, d.outcome, d.at, d.attr, d.reasons
    from (select project_id, 'Fail' as outcome, osc_1468 as at, osc_1469 as attr, osc_1248 as reasons
        from data_map_1.dm_pb_26_data  -- M1 Rejected
        where archived = false and osc_1468 > date '1900-01-01' and osc_1468 <= current_date
      union all select project_id, 'Pass', osc_1161, null, null from data_map_1.dm_pb_26_data  -- M1 Approved
        where archived = false and osc_1161 > date '1900-01-01' and osc_1161 <= current_date
      union all select project_id, 'Fail', osc_1533, osc_1531, osc_1259 from data_map_1.dm_pb_27_data  -- M2 Rejected
        where archived = false and osc_1533 > date '1900-01-01' and osc_1533 <= current_date
      union all select project_id, 'Pass', osc_1257, null, null from data_map_1.dm_pb_27_data  -- M2 Approved
        where archived = false and osc_1257 > date '1900-01-01' and osc_1257 <= current_date) d
  union all
  select 'Inspection', ppbe.project_id, case i.object_status_id when 69 then 'Fail' else 'Pass' end, i.changed_at,
      case when i.object_status_id = 69 then ev.osc_2349 end, case when i.object_status_id = 69 then ev.osc_727 end
    from (select a.project_process_block_event_id, a.object_status_id, a.changed_at,
          lag(a.object_status_id) over (partition by a.project_process_block_event_id order by a.changed_at, a.id) as prev
        from phoenix.project_process_block_event_audit a where a.event_id = 42) i  -- Final Inspection status history
    join phoenix.project_process_block_event ppbe on ppbe.id = i.project_process_block_event_id
    left join data_map_1.dm_ev_42_data ev on ev.project_process_block_event_id = i.project_process_block_event_id and ev.archived = false
    where i.object_status_id in (68, 69) and i.prev is distinct from i.object_status_id) o  -- set to Passed (68) or Failed (69)
left join data_map_1.dm_project_data p on p.project_id = o.project_id and p.archived = false
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and o.kind = 'Funding'
  and o.at::date between :start_date and :end_date  -- the outcome's day

Pitfalls:

  • A funding outcome is each M1 and M2 approved or rejected date on a block (archived blocks left out), so a block rejected then approved gives a fail and a pass; dated by the date.
  • Field-caused means the rejection attribution contains "Field", so "Field Audit" and "Field, Engineering" count as Field.
  • Each outcome is credited to whoever last clicked Ready for Funding (control 355) or Ready for Inspection (356) on or before its day; clicks start about 2026-02-14, so earlier outcomes have no agent but still count in the totals.
  • October 2026: 498 passes and 72 field-caused fails, 87.4%.
  • Counts M1 and M2 together, every attempt; not the Funding Dashboard's M1 and M2 pass rates or the Install Crew Leaderboard's M1 Pass Rate (Crew).

Funding Passes (Field Audit)

Operations Dashboard Field Audit: By Agent board, Funding Pass; Funding Outcomes by Day (Pass) · target none

Also called: Funding Pass

Definition: Funding outcomes in the range that passed.

SQL
select count(*) as value
from (select 'Funding' as kind, d.project_id, d.outcome, d.at, d.attr, d.reasons
    from (select project_id, 'Fail' as outcome, osc_1468 as at, osc_1469 as attr, osc_1248 as reasons
        from data_map_1.dm_pb_26_data  -- M1 Rejected
        where archived = false and osc_1468 > date '1900-01-01' and osc_1468 <= current_date
      union all select project_id, 'Pass', osc_1161, null, null from data_map_1.dm_pb_26_data  -- M1 Approved
        where archived = false and osc_1161 > date '1900-01-01' and osc_1161 <= current_date
      union all select project_id, 'Fail', osc_1533, osc_1531, osc_1259 from data_map_1.dm_pb_27_data  -- M2 Rejected
        where archived = false and osc_1533 > date '1900-01-01' and osc_1533 <= current_date
      union all select project_id, 'Pass', osc_1257, null, null from data_map_1.dm_pb_27_data  -- M2 Approved
        where archived = false and osc_1257 > date '1900-01-01' and osc_1257 <= current_date) d
  union all
  select 'Inspection', ppbe.project_id, case i.object_status_id when 69 then 'Fail' else 'Pass' end, i.changed_at,
      case when i.object_status_id = 69 then ev.osc_2349 end, case when i.object_status_id = 69 then ev.osc_727 end
    from (select a.project_process_block_event_id, a.object_status_id, a.changed_at,
          lag(a.object_status_id) over (partition by a.project_process_block_event_id order by a.changed_at, a.id) as prev
        from phoenix.project_process_block_event_audit a where a.event_id = 42) i  -- Final Inspection status history
    join phoenix.project_process_block_event ppbe on ppbe.id = i.project_process_block_event_id
    left join data_map_1.dm_ev_42_data ev on ev.project_process_block_event_id = i.project_process_block_event_id and ev.archived = false
    where i.object_status_id in (68, 69) and i.prev is distinct from i.object_status_id) o  -- set to Passed (68) or Failed (69)
left join data_map_1.dm_project_data p on p.project_id = o.project_id and p.archived = false
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and o.kind = 'Funding'
  and o.at::date between :start_date and :end_date  -- the outcome's day
  and o.outcome = 'Pass'

Pitfalls:

  • A funding outcome is each M1 and M2 approved or rejected date on a block (archived blocks left out), so a block rejected then approved gives a fail and a pass; dated by the date.

Funding Field-Caused Fails

Operations Dashboard Field Audit: Funding Field-Caused Fails (summary); By Agent board, Funding Fail; Funding Outcomes by Day (Field-Caused Fail) · target none

Also called: Funding Fail

Definition: Funding outcomes in the range that failed with the field among the attribution.

SQL
select count(*) as value
from (select 'Funding' as kind, d.project_id, d.outcome, d.at, d.attr, d.reasons
    from (select project_id, 'Fail' as outcome, osc_1468 as at, osc_1469 as attr, osc_1248 as reasons
        from data_map_1.dm_pb_26_data  -- M1 Rejected
        where archived = false and osc_1468 > date '1900-01-01' and osc_1468 <= current_date
      union all select project_id, 'Pass', osc_1161, null, null from data_map_1.dm_pb_26_data  -- M1 Approved
        where archived = false and osc_1161 > date '1900-01-01' and osc_1161 <= current_date
      union all select project_id, 'Fail', osc_1533, osc_1531, osc_1259 from data_map_1.dm_pb_27_data  -- M2 Rejected
        where archived = false and osc_1533 > date '1900-01-01' and osc_1533 <= current_date
      union all select project_id, 'Pass', osc_1257, null, null from data_map_1.dm_pb_27_data  -- M2 Approved
        where archived = false and osc_1257 > date '1900-01-01' and osc_1257 <= current_date) d
  union all
  select 'Inspection', ppbe.project_id, case i.object_status_id when 69 then 'Fail' else 'Pass' end, i.changed_at,
      case when i.object_status_id = 69 then ev.osc_2349 end, case when i.object_status_id = 69 then ev.osc_727 end
    from (select a.project_process_block_event_id, a.object_status_id, a.changed_at,
          lag(a.object_status_id) over (partition by a.project_process_block_event_id order by a.changed_at, a.id) as prev
        from phoenix.project_process_block_event_audit a where a.event_id = 42) i  -- Final Inspection status history
    join phoenix.project_process_block_event ppbe on ppbe.id = i.project_process_block_event_id
    left join data_map_1.dm_ev_42_data ev on ev.project_process_block_event_id = i.project_process_block_event_id and ev.archived = false
    where i.object_status_id in (68, 69) and i.prev is distinct from i.object_status_id) o  -- set to Passed (68) or Failed (69)
left join data_map_1.dm_project_data p on p.project_id = o.project_id and p.archived = false
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and o.kind = 'Funding'
  and o.at::date between :start_date and :end_date  -- the outcome's day
  and o.outcome = 'Fail' and exists (select 1 from phoenix.list_value lv where lv.id = any(o.attr) and lv.list_value like '%Field%')

Pitfalls:

  • A funding outcome is each M1 and M2 approved or rejected date on a block (archived blocks left out), so a block rejected then approved gives a fail and a pass; dated by the date.
  • Field-caused means the rejection attribution contains "Field", so "Field Audit" and "Field, Engineering" count as Field.

Field-Caused Fail Reasons

Operations Dashboard Field Audit: Inspection Fail Reasons and Funding Fail Reasons bars · target none

Also called: Inspection Rejection Reason Breakdown; Funding Rejection Reason Breakdown

Definition: Field-caused inspection and funding fails in the range, one row per outcome type and reason.

SQL
select o.kind, r.list_value as category, count(*) as value
from (select 'Funding' as kind, d.project_id, d.outcome, d.at, d.attr, d.reasons
    from (select project_id, 'Fail' as outcome, osc_1468 as at, osc_1469 as attr, osc_1248 as reasons
        from data_map_1.dm_pb_26_data  -- M1 Rejected
        where archived = false and osc_1468 > date '1900-01-01' and osc_1468 <= current_date
      union all select project_id, 'Pass', osc_1161, null, null from data_map_1.dm_pb_26_data  -- M1 Approved
        where archived = false and osc_1161 > date '1900-01-01' and osc_1161 <= current_date
      union all select project_id, 'Fail', osc_1533, osc_1531, osc_1259 from data_map_1.dm_pb_27_data  -- M2 Rejected
        where archived = false and osc_1533 > date '1900-01-01' and osc_1533 <= current_date
      union all select project_id, 'Pass', osc_1257, null, null from data_map_1.dm_pb_27_data  -- M2 Approved
        where archived = false and osc_1257 > date '1900-01-01' and osc_1257 <= current_date) d
  union all
  select 'Inspection', ppbe.project_id, case i.object_status_id when 69 then 'Fail' else 'Pass' end, i.changed_at,
      case when i.object_status_id = 69 then ev.osc_2349 end, case when i.object_status_id = 69 then ev.osc_727 end
    from (select a.project_process_block_event_id, a.object_status_id, a.changed_at,
          lag(a.object_status_id) over (partition by a.project_process_block_event_id order by a.changed_at, a.id) as prev
        from phoenix.project_process_block_event_audit a where a.event_id = 42) i  -- Final Inspection status history
    join phoenix.project_process_block_event ppbe on ppbe.id = i.project_process_block_event_id
    left join data_map_1.dm_ev_42_data ev on ev.project_process_block_event_id = i.project_process_block_event_id and ev.archived = false
    where i.object_status_id in (68, 69) and i.prev is distinct from i.object_status_id) o  -- set to Passed (68) or Failed (69)
left join data_map_1.dm_project_data p on p.project_id = o.project_id and p.archived = false
left join phoenix.list_value r on r.id = any(o.reasons)
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and o.at::date between :start_date and :end_date  -- the outcome's day
  and exists (select 1 from phoenix.list_value lv where lv.id = any(o.attr) and lv.list_value like '%Field%')  -- attributed to Field
group by 1, 2
order by 1, value desc

Pitfalls:

  • QuickSight's Inspection Rejection Reason pie has no date filter (every fail ever), and its Funding pie filters to Inspection; Lumen's read the range and the right type (accepted).
  • A fail with two reasons counts under each; top 12 shown.
  • Field-caused means the rejection attribution contains "Field", so "Field Audit" and "Field, Engineering" count as Field.

Field Audits Completed (Field Audit Sheet)

Operations Dashboard Field Audit: Audits Completed (summary); By Agent board, Audits · target none

Also called: Audits Completed by Agent by Date

Definition: Install, ESC, correction and service appointments field audited in the range, each by the last change to its audit result, whoever audited it.

SQL
select count(*) as value
from (select 'Install' as kind, e.project_id, e.project_process_block_event_id as event_id, 639 as component,
      u.first_name, u.last_name
    from data_map_1.dm_ev_41_data e  -- Installation events: Field Audit Completed By
    left join phoenix.user_position up on up.id = e.osc_1172
    left join phoenix.user u on u.id = up.user_id
  union all
  select 'ESC', e.project_id, e.project_process_block_event_id, 1087, u.first_name, u.last_name
    from data_map_1.dm_ev_43_data e left join phoenix.user u on u.id = e.modified_by_id  -- last editor
  union all
  select 'Correction', e.project_id, e.project_process_block_event_id, 1089, u.first_name, u.last_name
    from data_map_1.dm_ev_44_data e left join phoenix.user u on u.id = e.modified_by_id
  union all
  select 'Service', e.project_id, e.project_process_block_event_id, 1091, u.first_name, u.last_name
    from data_map_1.dm_ev_45_data e left join phoenix.user u on u.id = e.modified_by_id) n
join (select distinct on (a.project_process_block_event_id, a.object_section_component_id)
      a.project_process_block_event_id, a.object_section_component_id, a.date_modified as changed_at
    from phoenix.project_process_block_event_component_entry_audit a
    where a.object_section_component_id in (639, 1087, 1089, 1091)  -- the four audit result fields
    order by a.project_process_block_event_id, a.object_section_component_id, a.date_modified desc) ch  -- its last change
  on ch.project_process_block_event_id = n.event_id and ch.object_section_component_id = n.component
left join data_map_1.dm_project_data p on p.project_id = n.project_id
where coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and ch.changed_at::date between :start_date and :end_date

Pitfalls:

  • Ops Leaderboards' Field Audits Completed with appointments that name no auditor kept in: October 2026 had 965 here against 963 there.
  • Dated by the audit result's last change; ESC, correction and service audits are credited to the appointment's last editor.
  • The sheet's date range runs on the outcomes' day; Audits use the same range on the audit's day.

Active Pipeline Jobs

SLA Dashboard Active Pipeline: Total Jobs tile · target none
SLA Dashboard Active Pipeline: Active Department Breakdown board, Total Active Jobs; Active Jobs by Department bars · target none

Sale date: contract signed (the main contract's OSC 23), neither Submitted nor Closed. See Sale dates.

Also called: Total Jobs; Total Active Jobs; distinct_active_in_dept

Definition: Projects sitting in a department's work queues now, counted once.

SQL
select count(distinct x.project_id) as value
from (select wqa.id, wqa.project_id, wq.work_queue_name, case when wq.work_queue_name like '%NEM%' then 'NEM'
              when wq.work_queue_name like '%PTO%' then 'PTO'
              when wq.work_queue_name like '%M1%' then 'M1'
              when wq.work_queue_name like '%M2%' then 'M2'
              when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
              when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
              else trim(wqt.work_queue_type) end as work_queue_type,
        trim(wqt.work_queue_type) as parent_wqt, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt,
        case when wq.work_queue_name like '%NTP%' then 4
              when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
              when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
              when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
              when wqt.work_queue_type = 'Deal Review' then 4
              else wqt.sla_target end as sla_target,  -- working days
        b.base_status, p.object_status_id, fin.record_name as financier,
        row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
          order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
      from phoenix.work_queue_activity wqa
      left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
      left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
      join data_map_1.dm_project_data p on p.project_id = wqa.project_id
      left join phoenix.state s on s.id = p.state_id
      left join phoenix.object_status o on o.id = p.object_status_id
      left join phoenix.base_status b on b.id = o.base_status_id
      left join lateral (select r.record_name from data_map_1.dm_pb_3_data c left join phoenix.record r on r.id = c.osc_849
          where c.project_id = p.project_id order by c.osc_23 desc limit 1) fin on true  -- the latest contract's financier
      where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_exited is null and date_exited_wqt is null and date_entered_wqt is not null  -- projects with an open stint
        )
        and b.id not in (2, 3)  -- project not complete or canceled
        and p.archived = false
        and wq.exclude_from_wqt_metrics = false
        and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      ) x
cross join lateral (select (select count(*) from generate_series(x.date_entered_wqt::date, current_date::date, interval '1 day') g(day)
      where extract(isodow from g.day) < 6) as tid) t  -- working days so far, both ends
where x.rn = 1  -- the project's latest stint in the queue type (an open one first)
  and x.date_entered_wqt is not null
  and not (x.work_queue_type = 'Deal Review' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Zeo One
  and not (x.work_queue_type = 'Field Audit' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Non-Standard
  and x.date_exited_wqt is null and x.date_exited is null  -- open
  and (x.object_status_id <> 58 or x.work_queue_type = 'Retention')  -- canceled only in Retention
  and (x.object_status_id <> 106 or x.work_queue_type in ('Deal Review', 'M1', 'Lost Funding'))
  and not exists (select 1 from data_map_1.dm_pb_20_data cmp where cmp.project_id = x.project_id and cmp.object_status_id in (84, 207, 86))  -- not in compliance
  and x.work_queue_name not in ('Vivint Smarthome', 'Pending Resurvey', 'Needs NEM Signature Verification')
  and coalesce(x.financier, '') not in ('Mosaic', 'Sunnova')

Pitfalls:

  • A snapshot as of today; no date parameters. Lumen's page shows it as of the day's load.
  • The latest stint per project and queue type, open now, on projects Active or On Hold (not test, not archived); canceled projects count only in Retention, status 106 only in Deal Review, M1 and Lost Funding; projects in compliance, the queues Vivint Smarthome, Pending Resurvey and Needs NEM Signature Verification, and Mosaic and Sunnova jobs are left out.
  • The tile counts each project once however many departments it sits in; the board and bars count it once per department. On 2026-12-03: 1,221 jobs, while In SLA plus Out of SLA made 1,543.
  • The Active Department Breakdown board splits it by department and keeps only 12 project statuses (4, 14, 34, 60, 61, 62, 63, 106, 107, 159, 206, 220), so its total row can run under the tile.
  • Not Sr Staff's Total Active Jobs, which counts only jobs submitted in its range, keeps Mosaic, Sunnova and the two hidden queues, and keeps Customer Care jobs in compliance.

Active Pipeline Jobs In SLA

SLA Dashboard Active Pipeline: In SLA tile; Active Department Breakdown board, In SLA · target the department's SLA Target

Sale date: contract signed (the main contract's OSC 23), neither Submitted nor Closed. See Sale dates.

Also called: In SLA; distinct_active_in_sla

Definition: Projects in a department whose working days there so far are at most its SLA target.

SQL
select count(distinct case when t.tid <= x.sla_target then x.project_id end) as value
from (select wqa.id, wqa.project_id, wq.work_queue_name, case when wq.work_queue_name like '%NEM%' then 'NEM'
              when wq.work_queue_name like '%PTO%' then 'PTO'
              when wq.work_queue_name like '%M1%' then 'M1'
              when wq.work_queue_name like '%M2%' then 'M2'
              when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
              when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
              else trim(wqt.work_queue_type) end as work_queue_type,
        trim(wqt.work_queue_type) as parent_wqt, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt,
        case when wq.work_queue_name like '%NTP%' then 4
              when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
              when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
              when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
              when wqt.work_queue_type = 'Deal Review' then 4
              else wqt.sla_target end as sla_target,  -- working days
        b.base_status, p.object_status_id, fin.record_name as financier,
        row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
          order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
      from phoenix.work_queue_activity wqa
      left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
      left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
      join data_map_1.dm_project_data p on p.project_id = wqa.project_id
      left join phoenix.state s on s.id = p.state_id
      left join phoenix.object_status o on o.id = p.object_status_id
      left join phoenix.base_status b on b.id = o.base_status_id
      left join lateral (select r.record_name from data_map_1.dm_pb_3_data c left join phoenix.record r on r.id = c.osc_849
          where c.project_id = p.project_id order by c.osc_23 desc limit 1) fin on true  -- the latest contract's financier
      where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_exited is null and date_exited_wqt is null and date_entered_wqt is not null  -- projects with an open stint
        )
        and b.id not in (2, 3)  -- project not complete or canceled
        and p.archived = false
        and wq.exclude_from_wqt_metrics = false
        and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      ) x
cross join lateral (select (select count(*) from generate_series(x.date_entered_wqt::date, current_date::date, interval '1 day') g(day)
      where extract(isodow from g.day) < 6) as tid) t  -- working days so far, both ends
where x.rn = 1  -- the project's latest stint in the queue type (an open one first)
  and x.date_entered_wqt is not null
  and not (x.work_queue_type = 'Deal Review' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Zeo One
  and not (x.work_queue_type = 'Field Audit' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Non-Standard
  and x.date_exited_wqt is null and x.date_exited is null  -- open
  and (x.object_status_id <> 58 or x.work_queue_type = 'Retention')  -- canceled only in Retention
  and (x.object_status_id <> 106 or x.work_queue_type in ('Deal Review', 'M1', 'Lost Funding'))
  and not exists (select 1 from data_map_1.dm_pb_20_data cmp where cmp.project_id = x.project_id and cmp.object_status_id in (84, 207, 86))  -- not in compliance
  and x.work_queue_name not in ('Vivint Smarthome', 'Pending Resurvey', 'Needs NEM Signature Verification')
  and coalesce(x.financier, '') not in ('Mosaic', 'Sunnova')

Pitfalls:

  • A snapshot as of today; no date parameters. Lumen's page shows it as of the day's load.
  • Working days run Monday to Friday from the day the project entered the department to today, both counted, holidays included, in UTC.
  • SLA targets are mostly the queue type's own; NTP queues 4, M1 and M2 7, Material Status 7, Not Ready to be Scheduled 30, Deal Review 4, Service 7 in Florida else 5.
  • A project in two departments, in SLA in one and out in the other, counts in both In SLA and Out of SLA.
  • Not Sr Staff's Active Jobs In SLA, which counts only jobs submitted in its range, keeps Mosaic, Sunnova and the two hidden queues, and keeps Customer Care jobs in compliance.

Active Pipeline Jobs Out of SLA

SLA Dashboard Active Pipeline: Out of SLA tile; Active Department Breakdown board, Out of SLA; Out of SLA by Department bars · target 0

Sale date: contract signed (the main contract's OSC 23), neither Submitted nor Closed. See Sale dates.

Also called: Out of SLA; active_out_sla

Definition: Projects in a department whose working days there so far pass its SLA target.

SQL
select count(distinct case when t.tid > x.sla_target then x.project_id end) as value
from (select wqa.id, wqa.project_id, wq.work_queue_name, case when wq.work_queue_name like '%NEM%' then 'NEM'
              when wq.work_queue_name like '%PTO%' then 'PTO'
              when wq.work_queue_name like '%M1%' then 'M1'
              when wq.work_queue_name like '%M2%' then 'M2'
              when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
              when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
              else trim(wqt.work_queue_type) end as work_queue_type,
        trim(wqt.work_queue_type) as parent_wqt, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt,
        case when wq.work_queue_name like '%NTP%' then 4
              when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
              when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
              when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
              when wqt.work_queue_type = 'Deal Review' then 4
              else wqt.sla_target end as sla_target,  -- working days
        b.base_status, p.object_status_id, fin.record_name as financier,
        row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
          order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
      from phoenix.work_queue_activity wqa
      left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
      left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
      join data_map_1.dm_project_data p on p.project_id = wqa.project_id
      left join phoenix.state s on s.id = p.state_id
      left join phoenix.object_status o on o.id = p.object_status_id
      left join phoenix.base_status b on b.id = o.base_status_id
      left join lateral (select r.record_name from data_map_1.dm_pb_3_data c left join phoenix.record r on r.id = c.osc_849
          where c.project_id = p.project_id order by c.osc_23 desc limit 1) fin on true  -- the latest contract's financier
      where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_exited is null and date_exited_wqt is null and date_entered_wqt is not null  -- projects with an open stint
        )
        and b.id not in (2, 3)  -- project not complete or canceled
        and p.archived = false
        and wq.exclude_from_wqt_metrics = false
        and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      ) x
cross join lateral (select (select count(*) from generate_series(x.date_entered_wqt::date, current_date::date, interval '1 day') g(day)
      where extract(isodow from g.day) < 6) as tid) t  -- working days so far, both ends
where x.rn = 1  -- the project's latest stint in the queue type (an open one first)
  and x.date_entered_wqt is not null
  and not (x.work_queue_type = 'Deal Review' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Zeo One
  and not (x.work_queue_type = 'Field Audit' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Non-Standard
  and x.date_exited_wqt is null and x.date_exited is null  -- open
  and (x.object_status_id <> 58 or x.work_queue_type = 'Retention')  -- canceled only in Retention
  and (x.object_status_id <> 106 or x.work_queue_type in ('Deal Review', 'M1', 'Lost Funding'))
  and not exists (select 1 from data_map_1.dm_pb_20_data cmp where cmp.project_id = x.project_id and cmp.object_status_id in (84, 207, 86))  -- not in compliance
  and x.work_queue_name not in ('Vivint Smarthome', 'Pending Resurvey', 'Needs NEM Signature Verification')
  and coalesce(x.financier, '') not in ('Mosaic', 'Sunnova')

Pitfalls:

  • A snapshot as of today; no date parameters. Lumen's page shows it as of the day's load.
  • Days count to today in UTC, so after 5 PM Mountain time a job can tip over a day early.
  • Not Sr Staff's Active Jobs Out of SLA, which counts only jobs submitted in its range, keeps Mosaic, Sunnova and the two hidden queues, and keeps Customer Care jobs in compliance.

Active Pipeline SLA %

SLA Dashboard Active Pipeline: SLA % (summary); Active Department Breakdown board, SLA % · target 65% (QuickSight shades a department under it)

Sale date: contract signed (the main contract's OSC 23), neither Submitted nor Closed. See Sale dates.

Also called: SLA %; active_sla_%

Definition: In SLA over In SLA plus Out of SLA, for jobs in the active pipeline now.

SQL
select count(distinct case when t.tid <= x.sla_target then x.project_id end)::numeric / nullif(count(distinct case when t.tid <= x.sla_target then x.project_id end) + count(distinct case when t.tid > x.sla_target then x.project_id end), 0) as value,
  count(distinct case when t.tid <= x.sla_target then x.project_id end) as num, count(distinct case when t.tid <= x.sla_target then x.project_id end) + count(distinct case when t.tid > x.sla_target then x.project_id end) as den
from (select wqa.id, wqa.project_id, wq.work_queue_name, case when wq.work_queue_name like '%NEM%' then 'NEM'
              when wq.work_queue_name like '%PTO%' then 'PTO'
              when wq.work_queue_name like '%M1%' then 'M1'
              when wq.work_queue_name like '%M2%' then 'M2'
              when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
              when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
              else trim(wqt.work_queue_type) end as work_queue_type,
        trim(wqt.work_queue_type) as parent_wqt, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt,
        case when wq.work_queue_name like '%NTP%' then 4
              when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
              when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
              when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
              when wqt.work_queue_type = 'Deal Review' then 4
              else wqt.sla_target end as sla_target,  -- working days
        b.base_status, p.object_status_id, fin.record_name as financier,
        row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
          order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
      from phoenix.work_queue_activity wqa
      left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
      left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
      join data_map_1.dm_project_data p on p.project_id = wqa.project_id
      left join phoenix.state s on s.id = p.state_id
      left join phoenix.object_status o on o.id = p.object_status_id
      left join phoenix.base_status b on b.id = o.base_status_id
      left join lateral (select r.record_name from data_map_1.dm_pb_3_data c left join phoenix.record r on r.id = c.osc_849
          where c.project_id = p.project_id order by c.osc_23 desc limit 1) fin on true  -- the latest contract's financier
      where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_exited is null and date_exited_wqt is null and date_entered_wqt is not null  -- projects with an open stint
        )
        and b.id not in (2, 3)  -- project not complete or canceled
        and p.archived = false
        and wq.exclude_from_wqt_metrics = false
        and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      ) x
cross join lateral (select (select count(*) from generate_series(x.date_entered_wqt::date, current_date::date, interval '1 day') g(day)
      where extract(isodow from g.day) < 6) as tid) t  -- working days so far, both ends
where x.rn = 1  -- the project's latest stint in the queue type (an open one first)
  and x.date_entered_wqt is not null
  and not (x.work_queue_type = 'Deal Review' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Zeo One
  and not (x.work_queue_type = 'Field Audit' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Non-Standard
  and x.date_exited_wqt is null and x.date_exited is null  -- open
  and (x.object_status_id <> 58 or x.work_queue_type = 'Retention')  -- canceled only in Retention
  and (x.object_status_id <> 106 or x.work_queue_type in ('Deal Review', 'M1', 'Lost Funding'))
  and not exists (select 1 from data_map_1.dm_pb_20_data cmp where cmp.project_id = x.project_id and cmp.object_status_id in (84, 207, 86))  -- not in compliance
  and x.work_queue_name not in ('Vivint Smarthome', 'Pending Resurvey', 'Needs NEM Signature Verification')
  and coalesce(x.financier, '') not in ('Mosaic', 'Sunnova')

Pitfalls:

  • A snapshot as of today; no date parameters. Lumen's page shows it as of the day's load.
  • A project in and out of SLA in two departments counts in both parts of the denominator.
  • Not Sr Staff's Active SLA %, which counts only jobs submitted in its range, keeps Mosaic, Sunnova and the two hidden queues, and keeps Customer Care jobs in compliance.

Active Pipeline Avg TID

SLA Dashboard Active Pipeline: Active Department Breakdown board, Avg TID; Avg TID by Department bars · target none

Sale date: contract signed (the main contract's OSC 23), neither Submitted nor Closed. See Sale dates.

Also called: Active TID; Avg TID

Definition: Average working days the active pipeline's jobs have sat in their department so far.

SQL
select avg(t.tid) as value  -- working days
from (select wqa.id, wqa.project_id, wq.work_queue_name, case when wq.work_queue_name like '%NEM%' then 'NEM'
              when wq.work_queue_name like '%PTO%' then 'PTO'
              when wq.work_queue_name like '%M1%' then 'M1'
              when wq.work_queue_name like '%M2%' then 'M2'
              when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
              when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
              else trim(wqt.work_queue_type) end as work_queue_type,
        trim(wqt.work_queue_type) as parent_wqt, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt,
        case when wq.work_queue_name like '%NTP%' then 4
              when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
              when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
              when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
              when wqt.work_queue_type = 'Deal Review' then 4
              else wqt.sla_target end as sla_target,  -- working days
        b.base_status, p.object_status_id, fin.record_name as financier,
        row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
          order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
      from phoenix.work_queue_activity wqa
      left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
      left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
      join data_map_1.dm_project_data p on p.project_id = wqa.project_id
      left join phoenix.state s on s.id = p.state_id
      left join phoenix.object_status o on o.id = p.object_status_id
      left join phoenix.base_status b on b.id = o.base_status_id
      left join lateral (select r.record_name from data_map_1.dm_pb_3_data c left join phoenix.record r on r.id = c.osc_849
          where c.project_id = p.project_id order by c.osc_23 desc limit 1) fin on true  -- the latest contract's financier
      where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_exited is null and date_exited_wqt is null and date_entered_wqt is not null  -- projects with an open stint
        )
        and b.id not in (2, 3)  -- project not complete or canceled
        and p.archived = false
        and wq.exclude_from_wqt_metrics = false
        and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      ) x
cross join lateral (select (select count(*) from generate_series(x.date_entered_wqt::date, current_date::date, interval '1 day') g(day)
      where extract(isodow from g.day) < 6) as tid) t  -- working days so far, both ends
where x.rn = 1  -- the project's latest stint in the queue type (an open one first)
  and x.date_entered_wqt is not null
  and not (x.work_queue_type = 'Deal Review' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Zeo One
  and not (x.work_queue_type = 'Field Audit' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Non-Standard
  and x.date_exited_wqt is null and x.date_exited is null  -- open
  and (x.object_status_id <> 58 or x.work_queue_type = 'Retention')  -- canceled only in Retention
  and (x.object_status_id <> 106 or x.work_queue_type in ('Deal Review', 'M1', 'Lost Funding'))
  and not exists (select 1 from data_map_1.dm_pb_20_data cmp where cmp.project_id = x.project_id and cmp.object_status_id in (84, 207, 86))  -- not in compliance
  and x.work_queue_name not in ('Vivint Smarthome', 'Pending Resurvey', 'Needs NEM Signature Verification')
  and coalesce(x.financier, '') not in ('Mosaic', 'Sunnova')

Pitfalls:

  • A snapshot as of today; no date parameters. Lumen's page shows it as of the day's load.
  • Averaged over open stints, one per project and queue type, not over projects.
  • Counts from when the project entered the department, so moves between queues in one department don't reset it.
  • Not Sr Staff's Active TID, which counts only jobs submitted in its range, keeps Mosaic, Sunnova and the two hidden queues, and keeps Customer Care jobs in compliance.

Active Pipeline Total TID

SLA Dashboard Active Pipeline: Active Department Breakdown board, Total TID · target none

Sale date: contract signed (the main contract's OSC 23), neither Submitted nor Closed. See Sale dates.

Also called: Total TID; Total Days in Dept

Definition: Average calendar days the active pipeline's jobs have spent in their department across every stay, paused queues taken off.

SQL
select avg(dt.total_days_in_dept) as value  -- calendar days
from (select x.project_id, x.work_queue_type
  from (select wqa.id, wqa.project_id, wq.work_queue_name, case when wq.work_queue_name like '%NEM%' then 'NEM'
                when wq.work_queue_name like '%PTO%' then 'PTO'
                when wq.work_queue_name like '%M1%' then 'M1'
                when wq.work_queue_name like '%M2%' then 'M2'
                when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
                when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
                when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
                when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
                else trim(wqt.work_queue_type) end as work_queue_type,
          trim(wqt.work_queue_type) as parent_wqt, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt,
          case when wq.work_queue_name like '%NTP%' then 4
                when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
                when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
                when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
                when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
                when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
                when wqt.work_queue_type = 'Deal Review' then 4
                else wqt.sla_target end as sla_target,  -- working days
          b.base_status, p.object_status_id, fin.record_name as financier,
          row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
            order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
        from phoenix.work_queue_activity wqa
        left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
        left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
        join data_map_1.dm_project_data p on p.project_id = wqa.project_id
        left join phoenix.state s on s.id = p.state_id
        left join phoenix.object_status o on o.id = p.object_status_id
        left join phoenix.base_status b on b.id = o.base_status_id
        left join lateral (select r.record_name from data_map_1.dm_pb_3_data c left join phoenix.record r on r.id = c.osc_849
            where c.project_id = p.project_id order by c.osc_23 desc limit 1) fin on true  -- the latest contract's financier
        where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_exited is null and date_exited_wqt is null and date_entered_wqt is not null  -- projects with an open stint
          )
          and b.id not in (2, 3)  -- project not complete or canceled
          and p.archived = false
          and wq.exclude_from_wqt_metrics = false
          and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
        ) x
  cross join lateral (select (select count(*) from generate_series(x.date_entered_wqt::date, current_date::date, interval '1 day') g(day)
        where extract(isodow from g.day) < 6) as tid) t  -- working days so far, both ends
  where x.rn = 1  -- the project's latest stint in the queue type (an open one first)
    and x.date_entered_wqt is not null
    and not (x.work_queue_type = 'Deal Review' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
        join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
        join phoenix.work_queue zq on zq.id = z.work_queue_id
        where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One' and z.date_exited_wqt is null
          and zq.exclude_from_wqt_metrics = false))  -- in Zeo One
    and not (x.work_queue_type = 'Field Audit' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
        join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
        join phoenix.work_queue zq on zq.id = z.work_queue_id
        where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard' and z.date_exited_wqt is null
          and zq.exclude_from_wqt_metrics = false))  -- in Non-Standard
    and x.date_exited_wqt is null and x.date_exited is null  -- open
    and (x.object_status_id <> 58 or x.work_queue_type = 'Retention')  -- canceled only in Retention
    and (x.object_status_id <> 106 or x.work_queue_type in ('Deal Review', 'M1', 'Lost Funding'))
    and not exists (select 1 from data_map_1.dm_pb_20_data cmp where cmp.project_id = x.project_id and cmp.object_status_id in (84, 207, 86))  -- not in compliance
    and x.work_queue_name not in ('Vivint Smarthome', 'Pending Resurvey', 'Needs NEM Signature Verification')
    and coalesce(x.financier, '') not in ('Mosaic', 'Sunnova')
  ) x
left join (select us.project_id, us.work_queue_type, count(*) as times_in_dept,
      sum(greatest(us.raw_days - us.pause_days, 0)) as total_days_in_dept
    from (select u.project_id, u.work_queue_type, u.date_entered_wqt,
        extract(epoch from coalesce(u.max_exit, now()) - u.date_entered_wqt) / 86400.0 as raw_days,
        coalesce(sum(case when z.date_entered is null then 0  -- no paused queue overlapping
          else extract(epoch from least(coalesce(z.date_exited, now()), coalesce(u.max_exit, now()))
            - greatest(z.date_entered, u.date_entered_wqt)) / 86400.0 end), 0) as pause_days
      from (select y.project_id, y.work_queue_type, y.date_entered_wqt,
            case when bool_or(y.date_exited_wqt is null) then null else max(y.date_exited_wqt) end as max_exit
          from (select wqa.project_id, case when wq.work_queue_name like '%NEM%' then 'NEM'
                            when wq.work_queue_name like '%PTO%' then 'PTO'
                            when wq.work_queue_name like '%M1%' then 'M1'
                            when wq.work_queue_name like '%M2%' then 'M2'
                            when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
                            when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
                            when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
                            when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
                            else trim(wqt.work_queue_type) end as work_queue_type,
                    trim(wqt.work_queue_type) as parent_wqt, wq.work_queue_name, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt
                  from phoenix.work_queue_activity wqa
                  left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
                  left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
                  join data_map_1.dm_project_data p on p.project_id = wqa.project_id
                  left join phoenix.state s on s.id = p.state_id
                  left join phoenix.object_status o on o.id = p.object_status_id
                  where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_exited is null and date_exited_wqt is null and date_entered_wqt is not null
                    )
                    and o.base_status_id not in (2, 3) and p.archived = false and wq.exclude_from_wqt_metrics = false
                    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
                  ) y
          group by 1, 2, 3) u  -- each unique stay in the department
      left join (select wqa.project_id, case when wq.work_queue_name like '%NEM%' then 'NEM'
                          when wq.work_queue_name like '%PTO%' then 'PTO'
                          when wq.work_queue_name like '%M1%' then 'M1'
                          when wq.work_queue_name like '%M2%' then 'M2'
                          when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
                          when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
                          when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
                          when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
                          else trim(wqt.work_queue_type) end as work_queue_type,
                  trim(wqt.work_queue_type) as parent_wqt, wq.work_queue_name, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt
                from phoenix.work_queue_activity wqa
                left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
                left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
                join data_map_1.dm_project_data p on p.project_id = wqa.project_id
                left join phoenix.state s on s.id = p.state_id
                left join phoenix.object_status o on o.id = p.object_status_id
                where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_exited is null and date_exited_wqt is null and date_entered_wqt is not null
                  )
                  and o.base_status_id not in (2, 3) and p.archived = false and wq.exclude_from_wqt_metrics = false
                  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
                ) z
        on z.project_id = u.project_id and z.parent_wqt = u.work_queue_type
        and z.work_queue_name in ('Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold', 'Vivint Smarthome', 'Material Status')  -- paused queues
        and z.date_entered < coalesce(u.max_exit, now()) and coalesce(z.date_exited, now()) > u.date_entered_wqt
      group by 1, 2, 3, u.max_exit) us
    group by 1, 2) dt on dt.project_id = x.project_id and dt.work_queue_type = x.work_queue_type

Pitfalls:

  • A snapshot as of today; no date parameters. Lumen's page shows it as of the day's load.
  • Calendar days, fractional, where Avg TID beside it is working days.
  • Time in Not Ready to be Scheduled, Pending Install Day, Scheduling Hold, Vivint Smarthome and Material Status is taken off a department's stays when those queues sit under the same department.
  • Lumen's stored figure is counted to the load, so it reads a few minutes to a day behind a live query.

Active Pipeline Times in Dept

SLA Dashboard Active Pipeline: Active Department Breakdown board, Times in Dept · target none

Sale date: contract signed (the main contract's OSC 23), neither Submitted nor Closed. See Sale dates.

Also called: Times in Dept

Definition: Average number of separate stays the active pipeline's jobs have had in their department.

SQL
select avg(dt.times_in_dept) as value
from (select x.project_id, x.work_queue_type
  from (select wqa.id, wqa.project_id, wq.work_queue_name, case when wq.work_queue_name like '%NEM%' then 'NEM'
                when wq.work_queue_name like '%PTO%' then 'PTO'
                when wq.work_queue_name like '%M1%' then 'M1'
                when wq.work_queue_name like '%M2%' then 'M2'
                when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
                when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
                when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
                when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
                else trim(wqt.work_queue_type) end as work_queue_type,
          trim(wqt.work_queue_type) as parent_wqt, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt,
          case when wq.work_queue_name like '%NTP%' then 4
                when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
                when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
                when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
                when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
                when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
                when wqt.work_queue_type = 'Deal Review' then 4
                else wqt.sla_target end as sla_target,  -- working days
          b.base_status, p.object_status_id, fin.record_name as financier,
          row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
            order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
        from phoenix.work_queue_activity wqa
        left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
        left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
        join data_map_1.dm_project_data p on p.project_id = wqa.project_id
        left join phoenix.state s on s.id = p.state_id
        left join phoenix.object_status o on o.id = p.object_status_id
        left join phoenix.base_status b on b.id = o.base_status_id
        left join lateral (select r.record_name from data_map_1.dm_pb_3_data c left join phoenix.record r on r.id = c.osc_849
            where c.project_id = p.project_id order by c.osc_23 desc limit 1) fin on true  -- the latest contract's financier
        where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_exited is null and date_exited_wqt is null and date_entered_wqt is not null  -- projects with an open stint
          )
          and b.id not in (2, 3)  -- project not complete or canceled
          and p.archived = false
          and wq.exclude_from_wqt_metrics = false
          and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
        ) x
  cross join lateral (select (select count(*) from generate_series(x.date_entered_wqt::date, current_date::date, interval '1 day') g(day)
        where extract(isodow from g.day) < 6) as tid) t  -- working days so far, both ends
  where x.rn = 1  -- the project's latest stint in the queue type (an open one first)
    and x.date_entered_wqt is not null
    and not (x.work_queue_type = 'Deal Review' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
        join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
        join phoenix.work_queue zq on zq.id = z.work_queue_id
        where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One' and z.date_exited_wqt is null
          and zq.exclude_from_wqt_metrics = false))  -- in Zeo One
    and not (x.work_queue_type = 'Field Audit' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
        join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
        join phoenix.work_queue zq on zq.id = z.work_queue_id
        where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard' and z.date_exited_wqt is null
          and zq.exclude_from_wqt_metrics = false))  -- in Non-Standard
    and x.date_exited_wqt is null and x.date_exited is null  -- open
    and (x.object_status_id <> 58 or x.work_queue_type = 'Retention')  -- canceled only in Retention
    and (x.object_status_id <> 106 or x.work_queue_type in ('Deal Review', 'M1', 'Lost Funding'))
    and not exists (select 1 from data_map_1.dm_pb_20_data cmp where cmp.project_id = x.project_id and cmp.object_status_id in (84, 207, 86))  -- not in compliance
    and x.work_queue_name not in ('Vivint Smarthome', 'Pending Resurvey', 'Needs NEM Signature Verification')
    and coalesce(x.financier, '') not in ('Mosaic', 'Sunnova')
  ) x
left join (select us.project_id, us.work_queue_type, count(*) as times_in_dept,
      sum(greatest(us.raw_days - us.pause_days, 0)) as total_days_in_dept
    from (select u.project_id, u.work_queue_type, u.date_entered_wqt,
        extract(epoch from coalesce(u.max_exit, now()) - u.date_entered_wqt) / 86400.0 as raw_days,
        coalesce(sum(case when z.date_entered is null then 0  -- no paused queue overlapping
          else extract(epoch from least(coalesce(z.date_exited, now()), coalesce(u.max_exit, now()))
            - greatest(z.date_entered, u.date_entered_wqt)) / 86400.0 end), 0) as pause_days
      from (select y.project_id, y.work_queue_type, y.date_entered_wqt,
            case when bool_or(y.date_exited_wqt is null) then null else max(y.date_exited_wqt) end as max_exit
          from (select wqa.project_id, case when wq.work_queue_name like '%NEM%' then 'NEM'
                            when wq.work_queue_name like '%PTO%' then 'PTO'
                            when wq.work_queue_name like '%M1%' then 'M1'
                            when wq.work_queue_name like '%M2%' then 'M2'
                            when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
                            when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
                            when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
                            when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
                            else trim(wqt.work_queue_type) end as work_queue_type,
                    trim(wqt.work_queue_type) as parent_wqt, wq.work_queue_name, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt
                  from phoenix.work_queue_activity wqa
                  left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
                  left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
                  join data_map_1.dm_project_data p on p.project_id = wqa.project_id
                  left join phoenix.state s on s.id = p.state_id
                  left join phoenix.object_status o on o.id = p.object_status_id
                  where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_exited is null and date_exited_wqt is null and date_entered_wqt is not null
                    )
                    and o.base_status_id not in (2, 3) and p.archived = false and wq.exclude_from_wqt_metrics = false
                    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
                  ) y
          group by 1, 2, 3) u  -- each unique stay in the department
      left join (select wqa.project_id, case when wq.work_queue_name like '%NEM%' then 'NEM'
                          when wq.work_queue_name like '%PTO%' then 'PTO'
                          when wq.work_queue_name like '%M1%' then 'M1'
                          when wq.work_queue_name like '%M2%' then 'M2'
                          when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
                          when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
                          when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
                          when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
                          else trim(wqt.work_queue_type) end as work_queue_type,
                  trim(wqt.work_queue_type) as parent_wqt, wq.work_queue_name, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt
                from phoenix.work_queue_activity wqa
                left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
                left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
                join data_map_1.dm_project_data p on p.project_id = wqa.project_id
                left join phoenix.state s on s.id = p.state_id
                left join phoenix.object_status o on o.id = p.object_status_id
                where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_exited is null and date_exited_wqt is null and date_entered_wqt is not null
                  )
                  and o.base_status_id not in (2, 3) and p.archived = false and wq.exclude_from_wqt_metrics = false
                  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
                ) z
        on z.project_id = u.project_id and z.parent_wqt = u.work_queue_type
        and z.work_queue_name in ('Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold', 'Vivint Smarthome', 'Material Status')  -- paused queues
        and z.date_entered < coalesce(u.max_exit, now()) and coalesce(z.date_exited, now()) > u.date_entered_wqt
      group by 1, 2, 3, u.max_exit) us
    group by 1, 2) dt on dt.project_id = x.project_id and dt.work_queue_type = x.work_queue_type

Pitfalls:

  • A snapshot as of today; no date parameters. Lumen's page shows it as of the day's load.
  • A stay is a distinct entry into the department, so moving between its queues doesn't add one; only stays on record from Phoenix's work queue history count.

Active Jobs by Working Days in Department

SLA Dashboard Active Pipeline: Active Jobs by Working Days in Department bars · target none

Sale date: contract signed (the main contract's OSC 23), neither Submitted nor Closed. See Sale dates.

Also called: Backlog Health; active_tid_buckets

Definition: Open stints in the active pipeline by working days in the department so far, in five-day buckets up to 30+.

SQL
select case when t.tid < 5 then '< 5 Days' else least(t.tid / 5 * 5, 30) || '+ Days' end as category, count(*) as value
from (select wqa.id, wqa.project_id, wq.work_queue_name, case when wq.work_queue_name like '%NEM%' then 'NEM'
              when wq.work_queue_name like '%PTO%' then 'PTO'
              when wq.work_queue_name like '%M1%' then 'M1'
              when wq.work_queue_name like '%M2%' then 'M2'
              when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
              when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
              else trim(wqt.work_queue_type) end as work_queue_type,
        trim(wqt.work_queue_type) as parent_wqt, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt,
        case when wq.work_queue_name like '%NTP%' then 4
              when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
              when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
              when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
              when wqt.work_queue_type = 'Deal Review' then 4
              else wqt.sla_target end as sla_target,  -- working days
        b.base_status, p.object_status_id, fin.record_name as financier,
        row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
          order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
      from phoenix.work_queue_activity wqa
      left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
      left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
      join data_map_1.dm_project_data p on p.project_id = wqa.project_id
      left join phoenix.state s on s.id = p.state_id
      left join phoenix.object_status o on o.id = p.object_status_id
      left join phoenix.base_status b on b.id = o.base_status_id
      left join lateral (select r.record_name from data_map_1.dm_pb_3_data c left join phoenix.record r on r.id = c.osc_849
          where c.project_id = p.project_id order by c.osc_23 desc limit 1) fin on true  -- the latest contract's financier
      where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_exited is null and date_exited_wqt is null and date_entered_wqt is not null  -- projects with an open stint
        )
        and b.id not in (2, 3)  -- project not complete or canceled
        and p.archived = false
        and wq.exclude_from_wqt_metrics = false
        and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      ) x
cross join lateral (select (select count(*) from generate_series(x.date_entered_wqt::date, current_date::date, interval '1 day') g(day)
      where extract(isodow from g.day) < 6) as tid) t  -- working days so far, both ends
where x.rn = 1  -- the project's latest stint in the queue type (an open one first)
  and x.date_entered_wqt is not null
  and not (x.work_queue_type = 'Deal Review' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Zeo One
  and not (x.work_queue_type = 'Field Audit' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Non-Standard
  and x.date_exited_wqt is null and x.date_exited is null  -- open
  and (x.object_status_id <> 58 or x.work_queue_type = 'Retention')  -- canceled only in Retention
  and (x.object_status_id <> 106 or x.work_queue_type in ('Deal Review', 'M1', 'Lost Funding'))
  and not exists (select 1 from data_map_1.dm_pb_20_data cmp where cmp.project_id = x.project_id and cmp.object_status_id in (84, 207, 86))  -- not in compliance
  and x.work_queue_name not in ('Vivint Smarthome', 'Pending Resurvey', 'Needs NEM Signature Verification')
  and coalesce(x.financier, '') not in ('Mosaic', 'Sunnova')
group by 1
order by min(t.tid)

Pitfalls:

  • A snapshot as of today; no date parameters. Lumen's page shows it as of the day's load.
  • Counts stints, not projects: a project in two departments counts twice.
  • QuickSight draws it as a pie; Lumen as bars in bucket order.

Accounts In

SLA Dashboard Department Throughput: Accounts In tile; Accounts In and Out line; Throughput by Department board, Accounts In · target none

Also called: Accounts In

Definition: Department stints entered in the range.

SQL
select count(*) as value
from (select wqa.id, wqa.project_id, wq.work_queue_name, case when wq.work_queue_name like '%NEM%' then 'NEM'
              when wq.work_queue_name like '%PTO%' then 'PTO'
              when wq.work_queue_name like '%M1%' then 'M1'
              when wq.work_queue_name like '%M2%' then 'M2'
              when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
              when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
              else trim(wqt.work_queue_type) end as work_queue_type,
        trim(wqt.work_queue_type) as parent_wqt, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt,
        case when wq.work_queue_name like '%NTP%' then 4
              when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
              when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
              when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
              when wqt.work_queue_type = 'Deal Review' then 4
              else wqt.sla_target end as sla_target,  -- working days
        b.base_status, p.object_status_id,
        row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
          order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
      from phoenix.work_queue_activity wqa
      left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
      left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
      join data_map_1.dm_project_data p on p.project_id = wqa.project_id
      left join phoenix.state s on s.id = p.state_id
      left join phoenix.object_status o on o.id = p.object_status_id
      left join phoenix.base_status b on b.id = o.base_status_id
      where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_entered_wqt::date between :start_date and :end_date
          or date_exited_wqt::date between :start_date and :end_date  -- projects with a stint entering or leaving in the range
        )
        and b.id not in (2, 3)  -- project not complete or canceled
        and p.archived = false
        and wq.exclude_from_wqt_metrics = false
        and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      ) x
where x.rn = 1  -- the project's latest stint in the queue type (an open one first)
  and x.date_entered_wqt is not null
  and not (x.work_queue_type = 'Deal Review' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Zeo One
  and not (x.work_queue_type = 'Field Audit' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Non-Standard
  and x.work_queue_name <> 'Vivint Smarthome'
  and x.date_entered_wqt::date between :start_date and :end_date  -- entered the department

Pitfalls:

  • Only each project's latest stint in each department counts, and only on projects still Active or On Hold today: a project that completed or canceled, or re-entered the department since, drops its older stint, so past weeks shrink over time.
  • Counts stints: a project entering three departments counts three times.
  • Opens year to date; Lumen's line weeks run Monday to Sunday.

Accounts Out

SLA Dashboard Department Throughput: Accounts Out tile; Accounts In and Out line; Throughput by Department board, Accounts Out · target none

Also called: Accounts Out

Definition: Department stints left in the range.

SQL
select count(*) as value
from (select wqa.id, wqa.project_id, wq.work_queue_name, case when wq.work_queue_name like '%NEM%' then 'NEM'
              when wq.work_queue_name like '%PTO%' then 'PTO'
              when wq.work_queue_name like '%M1%' then 'M1'
              when wq.work_queue_name like '%M2%' then 'M2'
              when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
              when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
              else trim(wqt.work_queue_type) end as work_queue_type,
        trim(wqt.work_queue_type) as parent_wqt, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt,
        case when wq.work_queue_name like '%NTP%' then 4
              when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
              when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
              when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
              when wqt.work_queue_type = 'Deal Review' then 4
              else wqt.sla_target end as sla_target,  -- working days
        b.base_status, p.object_status_id,
        row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
          order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
      from phoenix.work_queue_activity wqa
      left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
      left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
      join data_map_1.dm_project_data p on p.project_id = wqa.project_id
      left join phoenix.state s on s.id = p.state_id
      left join phoenix.object_status o on o.id = p.object_status_id
      left join phoenix.base_status b on b.id = o.base_status_id
      where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_entered_wqt::date between :start_date and :end_date
          or date_exited_wqt::date between :start_date and :end_date  -- projects with a stint entering or leaving in the range
        )
        and b.id not in (2, 3)  -- project not complete or canceled
        and p.archived = false
        and wq.exclude_from_wqt_metrics = false
        and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      ) x
where x.rn = 1  -- the project's latest stint in the queue type (an open one first)
  and x.date_entered_wqt is not null
  and not (x.work_queue_type = 'Deal Review' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Zeo One
  and not (x.work_queue_type = 'Field Audit' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Non-Standard
  and x.work_queue_name <> 'Vivint Smarthome'
  and x.date_exited_wqt is not null
  and x.date_exited_wqt::date between :start_date and :end_date  -- left the department

Pitfalls:

  • Only each project's latest stint in each department counts, and only on projects still Active or On Hold today: a project that completed or canceled, or re-entered the department since, drops its older stint, so past weeks shrink over time.
  • Lumen counts stints by the day they left; QuickSight's counts them by the week they entered (accepted).

Jobs Pushed In SLA

SLA Dashboard Department Throughput: Jobs Pushed In SLA tile; Jobs Pushed Within SLA bars; board · target none

Also called: pushed_within_sla

Definition: Stints that left their department in the range within its SLA target.

SQL
select count(*) as value
from (select wqa.id, wqa.project_id, wq.work_queue_name, case when wq.work_queue_name like '%NEM%' then 'NEM'
              when wq.work_queue_name like '%PTO%' then 'PTO'
              when wq.work_queue_name like '%M1%' then 'M1'
              when wq.work_queue_name like '%M2%' then 'M2'
              when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
              when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
              else trim(wqt.work_queue_type) end as work_queue_type,
        trim(wqt.work_queue_type) as parent_wqt, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt,
        case when wq.work_queue_name like '%NTP%' then 4
              when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
              when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
              when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
              when wqt.work_queue_type = 'Deal Review' then 4
              else wqt.sla_target end as sla_target,  -- working days
        b.base_status, p.object_status_id,
        row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
          order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
      from phoenix.work_queue_activity wqa
      left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
      left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
      join data_map_1.dm_project_data p on p.project_id = wqa.project_id
      left join phoenix.state s on s.id = p.state_id
      left join phoenix.object_status o on o.id = p.object_status_id
      left join phoenix.base_status b on b.id = o.base_status_id
      where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_entered_wqt::date between :start_date and :end_date
          or date_exited_wqt::date between :start_date and :end_date  -- projects with a stint entering or leaving in the range
        )
        and b.id not in (2, 3)  -- project not complete or canceled
        and p.archived = false
        and wq.exclude_from_wqt_metrics = false
        and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      ) x
where x.rn = 1  -- the project's latest stint in the queue type (an open one first)
  and x.date_entered_wqt is not null
  and not (x.work_queue_type = 'Deal Review' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Zeo One
  and not (x.work_queue_type = 'Field Audit' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Non-Standard
  and x.work_queue_name <> 'Vivint Smarthome'
  and x.date_exited_wqt is not null
  and x.date_exited_wqt::date between :start_date and :end_date  -- left the department
  and (select count(*) from generate_series(x.date_entered_wqt::date, x.date_exited_wqt::date, interval '1 day') g(day)
      where extract(isodow from g.day) < 6) <= x.sla_target  -- working days, both ends

Pitfalls:

  • Only each project's latest stint in each department counts, and only on projects still Active or On Hold today: a project that completed or canceled, or re-entered the department since, drops its older stint, so past weeks shrink over time.
  • Working days from entering to leaving, both counted, so a job in and out on one weekday took 1 day.

Jobs Pushed Out of SLA

SLA Dashboard Department Throughput: Jobs Pushed Out of SLA tile; Jobs Pushed Within SLA bars; board · target none

Also called: pushed_out_of_sla

Definition: Stints that left their department in the range past its SLA target.

SQL
select count(*) as value
from (select wqa.id, wqa.project_id, wq.work_queue_name, case when wq.work_queue_name like '%NEM%' then 'NEM'
              when wq.work_queue_name like '%PTO%' then 'PTO'
              when wq.work_queue_name like '%M1%' then 'M1'
              when wq.work_queue_name like '%M2%' then 'M2'
              when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
              when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
              else trim(wqt.work_queue_type) end as work_queue_type,
        trim(wqt.work_queue_type) as parent_wqt, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt,
        case when wq.work_queue_name like '%NTP%' then 4
              when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
              when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
              when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
              when wqt.work_queue_type = 'Deal Review' then 4
              else wqt.sla_target end as sla_target,  -- working days
        b.base_status, p.object_status_id,
        row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
          order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
      from phoenix.work_queue_activity wqa
      left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
      left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
      join data_map_1.dm_project_data p on p.project_id = wqa.project_id
      left join phoenix.state s on s.id = p.state_id
      left join phoenix.object_status o on o.id = p.object_status_id
      left join phoenix.base_status b on b.id = o.base_status_id
      where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_entered_wqt::date between :start_date and :end_date
          or date_exited_wqt::date between :start_date and :end_date  -- projects with a stint entering or leaving in the range
        )
        and b.id not in (2, 3)  -- project not complete or canceled
        and p.archived = false
        and wq.exclude_from_wqt_metrics = false
        and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      ) x
where x.rn = 1  -- the project's latest stint in the queue type (an open one first)
  and x.date_entered_wqt is not null
  and not (x.work_queue_type = 'Deal Review' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Zeo One
  and not (x.work_queue_type = 'Field Audit' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Non-Standard
  and x.work_queue_name <> 'Vivint Smarthome'
  and x.date_exited_wqt is not null
  and x.date_exited_wqt::date between :start_date and :end_date  -- left the department
  and (select count(*) from generate_series(x.date_entered_wqt::date, x.date_exited_wqt::date, interval '1 day') g(day)
      where extract(isodow from g.day) < 6) > x.sla_target  -- working days, both ends

Pitfalls:

  • Only each project's latest stint in each department counts, and only on projects still Active or On Hold today: a project that completed or canceled, or re-entered the department since, drops its older stint, so past weeks shrink over time.

% Pushed In SLA

SLA Dashboard Department Throughput: % Pushed In SLA tile; rate line on Jobs Pushed Within SLA; board · target 50% (QuickSight shades a department under it)

Also called: %_pushed_in_sla

Definition: Of stints that left their department in the range with an SLA target, the share that left within it.

SQL
select count(*) filter (where (select count(*) from generate_series(x.date_entered_wqt::date, x.date_exited_wqt::date, interval '1 day') g(day)
      where extract(isodow from g.day) < 6) <= x.sla_target)::numeric / nullif(count(*), 0) as value,
  count(*) filter (where (select count(*) from generate_series(x.date_entered_wqt::date, x.date_exited_wqt::date, interval '1 day') g(day)
      where extract(isodow from g.day) < 6) <= x.sla_target) as num, count(*) as den
from (select wqa.id, wqa.project_id, wq.work_queue_name, case when wq.work_queue_name like '%NEM%' then 'NEM'
              when wq.work_queue_name like '%PTO%' then 'PTO'
              when wq.work_queue_name like '%M1%' then 'M1'
              when wq.work_queue_name like '%M2%' then 'M2'
              when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
              when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
              else trim(wqt.work_queue_type) end as work_queue_type,
        trim(wqt.work_queue_type) as parent_wqt, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt,
        case when wq.work_queue_name like '%NTP%' then 4
              when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
              when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
              when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
              when wqt.work_queue_type = 'Deal Review' then 4
              else wqt.sla_target end as sla_target,  -- working days
        b.base_status, p.object_status_id,
        row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
          order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
      from phoenix.work_queue_activity wqa
      left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
      left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
      join data_map_1.dm_project_data p on p.project_id = wqa.project_id
      left join phoenix.state s on s.id = p.state_id
      left join phoenix.object_status o on o.id = p.object_status_id
      left join phoenix.base_status b on b.id = o.base_status_id
      where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_entered_wqt::date between :start_date and :end_date
          or date_exited_wqt::date between :start_date and :end_date  -- projects with a stint entering or leaving in the range
        )
        and b.id not in (2, 3)  -- project not complete or canceled
        and p.archived = false
        and wq.exclude_from_wqt_metrics = false
        and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      ) x
where x.rn = 1  -- the project's latest stint in the queue type (an open one first)
  and x.date_entered_wqt is not null
  and not (x.work_queue_type = 'Deal Review' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Zeo One
  and not (x.work_queue_type = 'Field Audit' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Non-Standard
  and x.work_queue_name <> 'Vivint Smarthome'
  and x.date_exited_wqt is not null
  and x.date_exited_wqt::date between :start_date and :end_date  -- left the department
  and x.sla_target is not null

Pitfalls:

  • Only each project's latest stint in each department counts, and only on projects still Active or On Hold today: a project that completed or canceled, or re-entered the department since, drops its older stint, so past weeks shrink over time.
  • QuickSight shows it per department only, never as one figure.
  • The Jobs Pushed Within SLA bars keep QuickSight's Sunday weeks.

Throughput Avg TID

SLA Dashboard Department Throughput: Avg TID line; Throughput by Department board, Avg TID · target none

Also called: TID; TID Over Time

Definition: Average working days stints entered in the range spent in their department: to leaving, or to today while still there.

SQL
select avg(case when x.date_exited_wqt is not null then (select count(*) from generate_series(x.date_entered_wqt::date, x.date_exited_wqt::date, interval '1 day') g(day)
      where extract(isodow from g.day) < 6)
    when x.work_queue_name like '%Hold%' or x.base_status = 'ON HOLD' then null  -- held: no TID
    else (select count(*) from generate_series(x.date_entered_wqt::date, current_date::date, interval '1 day') g(day)
      where extract(isodow from g.day) < 6) end) as value  -- working days
from (select wqa.id, wqa.project_id, wq.work_queue_name, case when wq.work_queue_name like '%NEM%' then 'NEM'
              when wq.work_queue_name like '%PTO%' then 'PTO'
              when wq.work_queue_name like '%M1%' then 'M1'
              when wq.work_queue_name like '%M2%' then 'M2'
              when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
              when wq.work_queue_name = 'Ready to Schedule Service Work' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 'Service'
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 'Scheduling'
              else trim(wqt.work_queue_type) end as work_queue_type,
        trim(wqt.work_queue_type) as parent_wqt, wqa.date_entered, wqa.date_exited, wqa.date_entered_wqt, wqa.date_exited_wqt,
        case when wq.work_queue_name like '%NTP%' then 4
              when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' then 7
              when wq.work_queue_name in ('Material Status', 'Ready to Schedule Service Work') then 7
              when wq.work_queue_name = 'Not Ready to be Scheduled' then 30
              when wqt.work_queue_type = 'Service' and s.state_name = 'Florida' then 7
              when wqt.work_queue_type = 'Service' and s.state_name != 'Florida' then 5
              when wqt.work_queue_type = 'Deal Review' then 4
              else wqt.sla_target end as sla_target,  -- working days
        b.base_status, p.object_status_id,
        row_number() over (partition by wqa.project_id, wqa.work_queue_type_id
          order by case when wqa.date_exited is null then 0 else 1 end, wqa.date_entered desc nulls last, wqa.id desc) as rn
      from phoenix.work_queue_activity wqa
      left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
      left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
      join data_map_1.dm_project_data p on p.project_id = wqa.project_id
      left join phoenix.state s on s.id = p.state_id
      left join phoenix.object_status o on o.id = p.object_status_id
      left join phoenix.base_status b on b.id = o.base_status_id
      where wqa.project_id in (select project_id from phoenix.work_queue_activity where date_entered_wqt::date between :start_date and :end_date
          or date_exited_wqt::date between :start_date and :end_date  -- projects with a stint entering or leaving in the range
        )
        and b.id not in (2, 3)  -- project not complete or canceled
        and p.archived = false
        and wq.exclude_from_wqt_metrics = false
        and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      ) x
where x.rn = 1  -- the project's latest stint in the queue type (an open one first)
  and x.date_entered_wqt is not null
  and not (x.work_queue_type = 'Deal Review' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Zeo One' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Zeo One
  and not (x.work_queue_type = 'Field Audit' and x.date_exited_wqt is null and exists (select 1 from phoenix.work_queue_activity z
      join phoenix.work_queue_type zt on zt.id = z.work_queue_type_id
      join phoenix.work_queue zq on zq.id = z.work_queue_id
      where z.project_id = x.project_id and trim(zt.work_queue_type) = 'Non-Standard' and z.date_exited_wqt is null
        and zq.exclude_from_wqt_metrics = false))  -- in Non-Standard
  and x.work_queue_name <> 'Vivint Smarthome'
  and x.date_entered_wqt::date between :start_date and :end_date  -- entered the department

Pitfalls:

  • Only each project's latest stint in each department counts, and only on projects still Active or On Hold today: a project that completed or canceled, or re-entered the department since, drops its older stint, so past weeks shrink over time.
  • A stint still open in a Hold queue, or on a project On Hold, has no TID and drops out.
  • Lumen reads stints entered in the range; QuickSight's table reads every row (accepted).

Jobs Out of SLA

SLA Dashboard Out of SLA Trends: Jobs Out of SLA (summary); Jobs Out of SLA by Week pivot (total) · target none

Also called: Jobs out of SLA by Date

Definition: Projects past their department's SLA on the range's last day, summed across departments.

SQL
select count(distinct (k.project_id, k.work_queue_type)) as value
from (select j.*, row_number() over (partition by j.project_id, j.work_queue_type order by j.date_entered_wqt desc nulls last) as rn2
  from (select wqa.project_id, case when wq.work_queue_name like '%NEM%' then 'NEM'
          when wq.work_queue_name like '%PTO%' then 'PTO'
          when wq.work_queue_name like '%M1%' then 'M1'
          when wq.work_queue_name like '%M2%' then 'M2'
          when wq.work_queue_name like '%NTP%' or wq.work_queue_name in ('Submit PPCR', 'Resolve Stipulations') then 'Deal Review'
          when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
          else trim(wqt.work_queue_type) end as work_queue_type,
        wqa.date_entered_wqt, wqa.date_exited_wqt, case when wq.work_queue_name like '%NTP%' or wq.work_queue_name in ('Submit PPCR', 'Resolve Stipulations') then 4
          when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' or wq.work_queue_name = 'Material Status' then 7
          else wqt.sla_target end as sla_target,
        row_number() over (partition by wqa.project_id, wqa.work_queue_type_id order by wqa.date_entered desc nulls last, wqa.id desc) as rn
      from phoenix.work_queue_activity wqa
      left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
      left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
      join data_map_1.dm_project_data p on p.project_id = wqa.project_id
      left join phoenix.object_status o on o.id = p.object_status_id
      where wqa.project_id in (select project_id from phoenix.work_queue_activity
          where date_entered_wqt::date <= :end_date and (date_exited_wqt is null or date_exited_wqt > :end_date))  -- in a queue on the day
        and (o.base_status_id not in (2, 3) or wqa.date_exited_wqt is not null)  -- open stints only on live projects
        and wqa.date_entered_wqt is not null
        and wq.work_queue_name != 'Vivint Smarthome'
        and p.archived = false
        and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      ) j
  where j.rn = 1) k  -- the latest stint per queue type
cross join lateral (select (k.date_entered_wqt + ((k.sla_target + (k.sla_target / 5) * 2)
    + case when extract(dow from k.date_entered_wqt) = 0 then 1
        when extract(dow from k.date_entered_wqt) + (k.sla_target % 5) > 5 then 2 else 0 end) * interval '1 day')::date as breach) b  -- SLA breach day
where k.rn2 = 1  -- the latest per department
  and :end_date::date >= b.breach and :end_date::date >= date '2026-03-08'
  and :end_date::date < coalesce(k.date_exited_wqt, current_date + interval '1 day')  -- still there that day

Pitfalls:

  • Counted on the last day of the range (a week's figure on its last day), not summed over the range. The sheet starts 2026-03-08.
  • Each project's latest stint per department only, so a project's earlier breaches of a department it later re-entered vanish from history.
  • The breach day adds the SLA target in working days to the entry day by a weekday formula (QuickSight's), holidays included.
  • Unlike the Active Pipeline, no active-job, compliance or financier filters: canceled and completed projects' finished stints still count on past days.
  • Departments map NTP, Submit PPCR and Resolve Stipulations queues to Deal Review, which the Active Pipeline's mapping does not.
  • Summed over departments, so a project past SLA in two departments counts twice; the Active Pipeline's Out of SLA tile counts it once.
  • Counts every department, including nine with no line of their own (Material Status, Field Logistics, Funding, Not Ready to be Scheduled, Scheduling Hold, Retentions, Installation, Zeo One, PremiumCAD): on 2026-10-31 they held 253 of the 1,459, so the 18 lines don't add up to it.

Jobs Out of SLA by Department

SLA Dashboard Out of SLA Trends: the 18 department lines (Deal Review to Finalization); Jobs Out of SLA by Week pivot rows · target none

Also called: Deal Review Out of SLA; Engineering Out of SLA; NEM Out of SLA; Permitting Out of SLA; Scheduling Out of SLA; Procurement Out of SLA; Non Standard Out of SLA; Field Audit Out of SLA; Inspections Out of SLA; M1 Out of SLA; PTO Out of SLA; M2 Out of SLA; Service Out of SLA; Customer Care Out of SLA; Field Sales Out of SLA; Home Damage Out of SLA; Finance Out of SLA; Finalization Out of SLA

Definition: Projects past their department's SLA on the range's last day, one row per department.

SQL
select k.work_queue_type as category, count(distinct k.project_id) as value
from (select j.*, row_number() over (partition by j.project_id, j.work_queue_type order by j.date_entered_wqt desc nulls last) as rn2
  from (select wqa.project_id, case when wq.work_queue_name like '%NEM%' then 'NEM'
          when wq.work_queue_name like '%PTO%' then 'PTO'
          when wq.work_queue_name like '%M1%' then 'M1'
          when wq.work_queue_name like '%M2%' then 'M2'
          when wq.work_queue_name like '%NTP%' or wq.work_queue_name in ('Submit PPCR', 'Resolve Stipulations') then 'Deal Review'
          when wq.work_queue_name in ('Material Status', 'Not Ready to be Scheduled', 'Pending Install Day', 'Scheduling Hold') then wq.work_queue_name
          else trim(wqt.work_queue_type) end as work_queue_type,
        wqa.date_entered_wqt, wqa.date_exited_wqt, case when wq.work_queue_name like '%NTP%' or wq.work_queue_name in ('Submit PPCR', 'Resolve Stipulations') then 4
          when wq.work_queue_name like '%M1%' or wq.work_queue_name like '%M2%' or wq.work_queue_name = 'Material Status' then 7
          else wqt.sla_target end as sla_target,
        row_number() over (partition by wqa.project_id, wqa.work_queue_type_id order by wqa.date_entered desc nulls last, wqa.id desc) as rn
      from phoenix.work_queue_activity wqa
      left join phoenix.work_queue_type wqt on wqt.id = wqa.work_queue_type_id
      left join phoenix.work_queue wq on wq.id = wqa.work_queue_id
      join data_map_1.dm_project_data p on p.project_id = wqa.project_id
      left join phoenix.object_status o on o.id = p.object_status_id
      where wqa.project_id in (select project_id from phoenix.work_queue_activity
          where date_entered_wqt::date <= :end_date and (date_exited_wqt is null or date_exited_wqt > :end_date))  -- in a queue on the day
        and (o.base_status_id not in (2, 3) or wqa.date_exited_wqt is not null)  -- open stints only on live projects
        and wqa.date_entered_wqt is not null
        and wq.work_queue_name != 'Vivint Smarthome'
        and p.archived = false
        and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
      ) j
  where j.rn = 1) k  -- the latest stint per queue type
cross join lateral (select (k.date_entered_wqt + ((k.sla_target + (k.sla_target / 5) * 2)
    + case when extract(dow from k.date_entered_wqt) = 0 then 1
        when extract(dow from k.date_entered_wqt) + (k.sla_target % 5) > 5 then 2 else 0 end) * interval '1 day')::date as breach) b  -- SLA breach day
where k.rn2 = 1  -- the latest per department
  and :end_date::date >= b.breach and :end_date::date >= date '2026-03-08'
  and :end_date::date < coalesce(k.date_exited_wqt, current_date + interval '1 day')  -- still there that day
group by 1
order by value desc

Pitfalls:

  • Counted on the last day of the range (a week's figure on its last day), not summed over the range. The sheet starts 2026-03-08.
  • Each project's latest stint per department only, so a project's earlier breaches of a department it later re-entered vanish from history.
  • The breach day adds the SLA target in working days to the entry day by a weekday formula (QuickSight's), holidays included.
  • Unlike the Active Pipeline, no active-job, compliance or financier filters: canceled and completed projects' finished stints still count on past days.
  • Departments map NTP, Submit PPCR and Resolve Stipulations queues to Deal Review, which the Active Pipeline's mapping does not.
  • QuickSight's Field Sales line filtered Customer Care; Lumen's filters Field Sales (accepted).
  • A department with none past SLA on the last day stores no row, so Lumen's line for it shows the last day that had one.

Projects Paid, Not Install Verified

Commission Close Paid, Not IV: Projects tile · target none

Also called: Paid, Not IV; projects paid but not IV

Definition: Projects that had commission paid by the last month-end but were not install verified by it.

SQL
select count(distinct dm.project_id) as value
from data_map_1.dm_project_data dm
cross join (select (date_trunc('month', now() at time zone 'UTC') - interval '1 day')::date as as_of_date) a  -- the last month-end, UTC
join commission.sales_ledger sl on sl.project_id = dm.project_id  -- one row per ledger line
join phoenix.object_status os on os.id = dm.object_status_id
join commission.commission_type ct on ct.id = sl.commission_type_id
join commission.payee_type pt on pt.id = sl.payee_type_id
where (dm.osc_671 is null or dm.osc_671 > a.as_of_date)  -- not Installation Verified by the month-end
  and dm.archived = false
  and coalesce(cast(dm.osc_4076 as integer), 0) = 0  -- not a test account
  and os.base_status_id <> 3  -- project not canceled
  and sl.commission_type_id in (1, 3)
  and sl.total_commission_paid_to_date > 0
  and (sl.m1_paid_date::date <= a.as_of_date or sl.m2_paid_date::date <= a.as_of_date)  -- paid by the month-end

Pitfalls:

  • As of the last month-end (the last day of the previous month, UTC), with no date control; the sheet moves to the next close on the 1st. The old draft (entry 59) says Mountain time; the code says UTC.
  • Paid to date is the ledger's figure at the last load, not at the month-end, so a payment made after the close already counts (Conflict 40).
  • Commission types 1 and 3, any payee, with something paid and an M1 or M2 paid date on or before the month-end; projects not archived, not canceled (base status 3) and not Installation Verified (OSC 671) by the month-end (a project verified after the close stays on that close's list).
  • No sold floor, unlike IV, Not Paid's 2025-10-01 (Conflict 40).
  • Not checked on Phoenix: its MCP refuses the commission schema, so this body is Lumen's dataset SQL aggregated, unrun.
  • Rows are ledger lines: a project with a closer and a setter line is two rows, so count projects, never rows.

Commission Final, Paid Not IV

Commission Close Paid, Not IV: Total Commission Final tile · target none

Also called: Total Commission Final

Definition: The final commission on the ledger lines of projects paid but not install verified at the last month-end.

SQL
select sum(sl.total_commission_final) as value  -- dollars
from data_map_1.dm_project_data dm
cross join (select (date_trunc('month', now() at time zone 'UTC') - interval '1 day')::date as as_of_date) a  -- the last month-end, UTC
join commission.sales_ledger sl on sl.project_id = dm.project_id  -- one row per ledger line
join phoenix.object_status os on os.id = dm.object_status_id
join commission.commission_type ct on ct.id = sl.commission_type_id
join commission.payee_type pt on pt.id = sl.payee_type_id
where (dm.osc_671 is null or dm.osc_671 > a.as_of_date)  -- not Installation Verified by the month-end
  and dm.archived = false
  and coalesce(cast(dm.osc_4076 as integer), 0) = 0  -- not a test account
  and os.base_status_id <> 3  -- project not canceled
  and sl.commission_type_id in (1, 3)
  and sl.total_commission_paid_to_date > 0
  and (sl.m1_paid_date::date <= a.as_of_date or sl.m2_paid_date::date <= a.as_of_date)  -- paid by the month-end

Pitfalls:

  • As of the last month-end (the last day of the previous month, UTC), with no date control; the sheet moves to the next close on the 1st. The old draft (entry 59) says Mountain time; the code says UTC.
  • Paid to date is the ledger's figure at the last load, not at the month-end, so a payment made after the close already counts (Conflict 40).
  • Commission types 1 and 3, any payee, with something paid and an M1 or M2 paid date on or before the month-end; projects not archived, not canceled (base status 3) and not Installation Verified (OSC 671) by the month-end (a project verified after the close stays on that close's list).
  • No sold floor, unlike IV, Not Paid's 2025-10-01 (Conflict 40).
  • Not checked on Phoenix: its MCP refuses the commission schema, so this body is Lumen's dataset SQL aggregated, unrun.
  • Sums every ledger line, closer and setter alike.

Commission Paid to Date, Paid Not IV

Commission Close Paid, Not IV: Total Commission Paid to Date tile · target none

Also called: Total Commission Paid to Date

Definition: Commission paid so far on the ledger lines of projects paid but not install verified at the last month-end.

SQL
select sum(sl.total_commission_paid_to_date) as value  -- dollars
from data_map_1.dm_project_data dm
cross join (select (date_trunc('month', now() at time zone 'UTC') - interval '1 day')::date as as_of_date) a  -- the last month-end, UTC
join commission.sales_ledger sl on sl.project_id = dm.project_id  -- one row per ledger line
join phoenix.object_status os on os.id = dm.object_status_id
join commission.commission_type ct on ct.id = sl.commission_type_id
join commission.payee_type pt on pt.id = sl.payee_type_id
where (dm.osc_671 is null or dm.osc_671 > a.as_of_date)  -- not Installation Verified by the month-end
  and dm.archived = false
  and coalesce(cast(dm.osc_4076 as integer), 0) = 0  -- not a test account
  and os.base_status_id <> 3  -- project not canceled
  and sl.commission_type_id in (1, 3)
  and sl.total_commission_paid_to_date > 0
  and (sl.m1_paid_date::date <= a.as_of_date or sl.m2_paid_date::date <= a.as_of_date)  -- paid by the month-end

Pitfalls:

  • As of the last month-end (the last day of the previous month, UTC), with no date control; the sheet moves to the next close on the 1st. The old draft (entry 59) says Mountain time; the code says UTC.
  • Paid to date is the ledger's figure at the last load, not at the month-end, so a payment made after the close already counts (Conflict 40).
  • Commission types 1 and 3, any payee, with something paid and an M1 or M2 paid date on or before the month-end; projects not archived, not canceled (base status 3) and not Installation Verified (OSC 671) by the month-end (a project verified after the close stays on that close's list).
  • No sold floor, unlike IV, Not Paid's 2025-10-01 (Conflict 40).
  • Not checked on Phoenix: its MCP refuses the commission schema, so this body is Lumen's dataset SQL aggregated, unrun.

Projects Install Verified, Not Paid in Full

Commission Close IV, Not Paid: Projects tile · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: IV, Not Paid; projects IV but not paid in full

Definition: Projects install verified by the last month-end whose closer commission is not paid in full.

SQL
select count(distinct dm.project_id) as value
from data_map_1.dm_project_data dm
cross join (select (date_trunc('month', now() at time zone 'UTC') - interval '1 day')::date as as_of_date) a  -- the last month-end, UTC
join commission.sales_ledger sl on sl.project_id = dm.project_id  -- one row per ledger line
join commission.payee_type pt on pt.id = sl.payee_type_id
where dm.osc_671 is not null and dm.osc_671 <= a.as_of_date  -- Installation Verified by the month-end
  and dm.archived = false
  and coalesce(cast(dm.osc_4076 as integer), 0) = 0  -- not a test account
  and dm.osc_2240 is null  -- Spark closer paid to date blank
  and dm.osc_660 >= date '2025-10-01'  -- Project Submitted from 2025-10-01
  and coalesce(sl.total_commission_paid_to_date, 0) < coalesce(sl.total_commission_final, 0)  -- not paid in full
  and sl.commission_type_id = 1
  and sl.payee_type_id = 1  -- closer lines

Pitfalls:

  • As of the last month-end (the last day of the previous month, UTC), with no date control; the sheet moves to the next close on the 1st. The old draft (entry 59) says Mountain time; the code says UTC.
  • Paid to date is the ledger's figure at the last load, not at the month-end, so a payment made after the close already counts (Conflict 40).
  • Closer lines only (commission type 1, payee type 1) whose paid to date is under the final commission (blanks count as 0).
  • Its sold floor is Project Submitted (OSC 660) on or after 2025-10-01, which counts submissions, not sales (Project Closed, OSC 687). The sheet's Project Sold column is OSC 660 too.
  • Leaves out any project with Spark closer paid to date (OSC 2240) filled in, including a 0: on 2026-12-03, 264 of the 1,761 projects Installation Verified by 2026-11-30 and submitted from 2025-10-01 had it set, 138 of them to 0, and all drop out.
  • Does not leave out canceled projects, where Paid, Not IV does (Conflict 40); on 2026-12-03 none of the population above was canceled.
  • Not checked on Phoenix: its MCP refuses the commission schema, so this body is Lumen's dataset SQL aggregated, unrun.
  • Rows are ledger lines: a project with a closer and a setter line is two rows, so count projects, never rows.

Commission Final, IV Not Paid

Commission Close IV, Not Paid: Total Commission Final tile · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Total Commission Final

Definition: The final closer commission on install verified projects not paid in full at the last month-end.

SQL
select sum(sl.total_commission_final) as value  -- dollars
from data_map_1.dm_project_data dm
cross join (select (date_trunc('month', now() at time zone 'UTC') - interval '1 day')::date as as_of_date) a  -- the last month-end, UTC
join commission.sales_ledger sl on sl.project_id = dm.project_id  -- one row per ledger line
join commission.payee_type pt on pt.id = sl.payee_type_id
where dm.osc_671 is not null and dm.osc_671 <= a.as_of_date  -- Installation Verified by the month-end
  and dm.archived = false
  and coalesce(cast(dm.osc_4076 as integer), 0) = 0  -- not a test account
  and dm.osc_2240 is null  -- Spark closer paid to date blank
  and dm.osc_660 >= date '2025-10-01'  -- Project Submitted from 2025-10-01
  and coalesce(sl.total_commission_paid_to_date, 0) < coalesce(sl.total_commission_final, 0)  -- not paid in full
  and sl.commission_type_id = 1
  and sl.payee_type_id = 1  -- closer lines

Pitfalls:

  • As of the last month-end (the last day of the previous month, UTC), with no date control; the sheet moves to the next close on the 1st. The old draft (entry 59) says Mountain time; the code says UTC.
  • Paid to date is the ledger's figure at the last load, not at the month-end, so a payment made after the close already counts (Conflict 40).
  • Closer lines only (commission type 1, payee type 1) whose paid to date is under the final commission (blanks count as 0).
  • Its sold floor is Project Submitted (OSC 660) on or after 2025-10-01, which counts submissions, not sales (Project Closed, OSC 687). The sheet's Project Sold column is OSC 660 too.
  • Leaves out any project with Spark closer paid to date (OSC 2240) filled in, including a 0: on 2026-12-03, 264 of the 1,761 projects Installation Verified by 2026-11-30 and submitted from 2025-10-01 had it set, 138 of them to 0, and all drop out.
  • Does not leave out canceled projects, where Paid, Not IV does (Conflict 40); on 2026-12-03 none of the population above was canceled.
  • Not checked on Phoenix: its MCP refuses the commission schema, so this body is Lumen's dataset SQL aggregated, unrun.

Commission Paid to Date, IV Not Paid

Commission Close IV, Not Paid: Total Commission Paid to Date tile · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Total Commission Paid to Date

Definition: Closer commission paid so far on install verified projects not paid in full at the last month-end.

SQL
select sum(sl.total_commission_paid_to_date) as value  -- dollars
from data_map_1.dm_project_data dm
cross join (select (date_trunc('month', now() at time zone 'UTC') - interval '1 day')::date as as_of_date) a  -- the last month-end, UTC
join commission.sales_ledger sl on sl.project_id = dm.project_id  -- one row per ledger line
join commission.payee_type pt on pt.id = sl.payee_type_id
where dm.osc_671 is not null and dm.osc_671 <= a.as_of_date  -- Installation Verified by the month-end
  and dm.archived = false
  and coalesce(cast(dm.osc_4076 as integer), 0) = 0  -- not a test account
  and dm.osc_2240 is null  -- Spark closer paid to date blank
  and dm.osc_660 >= date '2025-10-01'  -- Project Submitted from 2025-10-01
  and coalesce(sl.total_commission_paid_to_date, 0) < coalesce(sl.total_commission_final, 0)  -- not paid in full
  and sl.commission_type_id = 1
  and sl.payee_type_id = 1  -- closer lines

Pitfalls:

  • As of the last month-end (the last day of the previous month, UTC), with no date control; the sheet moves to the next close on the 1st. The old draft (entry 59) says Mountain time; the code says UTC.
  • Paid to date is the ledger's figure at the last load, not at the month-end, so a payment made after the close already counts (Conflict 40).
  • Closer lines only (commission type 1, payee type 1) whose paid to date is under the final commission (blanks count as 0).
  • Its sold floor is Project Submitted (OSC 660) on or after 2025-10-01, which counts submissions, not sales (Project Closed, OSC 687). The sheet's Project Sold column is OSC 660 too.
  • Leaves out any project with Spark closer paid to date (OSC 2240) filled in, including a 0: on 2026-12-03, 264 of the 1,761 projects Installation Verified by 2026-11-30 and submitted from 2025-10-01 had it set, 138 of them to 0, and all drop out.
  • Does not leave out canceled projects, where Paid, Not IV does (Conflict 40); on 2026-12-03 none of the population above was canceled.
  • Not checked on Phoenix: its MCP refuses the commission schema, so this body is Lumen's dataset SQL aggregated, unrun.

Orphaned Projects

Orphaned Projects Without a Work Queue tile; headline · target none
Orphaned Projects By Project Status bar (one bar per status) · target none

Also called: Without a Work Queue; projects outside work queues; projects that fell through the cracks

Definition: Open projects (not archived, status not Finalized or Canceled) that sit in no active work queue, so nobody owns them.

SQL
select count(*) as value
from phoenix.project p
join phoenix.object_status pos on pos.id = p.object_status_id
join phoenix.base_status pbs on pbs.id = pos.base_status_id
where p.company_id = 1
  and not p.archived
  and pbs.base_status not in ('COMPLETE', 'CANCELED')  -- open; On Hold types count
  and not exists (select 1 from data_map_1.dm_project_data tap
    where tap.project_id = p.id and cast(tap.osc_4076 as integer) = 1)  -- not a test account
  and p.id not in (select a.project_id from phoenix.work_queue_activity a
      join phoenix.work_queue wq on wq.id = a.work_queue_id and not wq.archived
      where a.date_exited is null and not a.archived and a.project_id is not null)  -- in no active work queue

Pitfalls:

  • A snapshot as of the last load (today, UTC); the body takes no dates. The dataset holds today only, so it cannot say how the count changed.
  • On Hold, Legal Hold, Sales Hold, Pending Change Order and the other ON HOLD statuses are open, so they count: 65 of the 145 on 2026-12-03.
  • Queued means an open row in Albatross's own work queue log (work_queue_activity, not archived, in a queue not archived), not rebuilt from queue rules (data dictionary: Orphaned project).
  • Lumen adds company 1 and leaves out test accounts; the data dictionary page and the orphaned-projects-report skill's query do neither. On 2026-12-03 no orphaned project was a test account or another company's, so the counts agree.

Orphaned Projects Not On Hold

Orphaned Projects Not On Hold tile; headline · target none

Also called: Not On Hold

Definition: Orphaned projects whose project status is not an On Hold type.

SQL
select count(*) as value
from phoenix.project p
join phoenix.object_status pos on pos.id = p.object_status_id
join phoenix.base_status pbs on pbs.id = pos.base_status_id
where p.company_id = 1
  and not p.archived
  and pbs.base_status not in ('COMPLETE', 'CANCELED')  -- open; On Hold types count
  and not exists (select 1 from data_map_1.dm_project_data tap
    where tap.project_id = p.id and cast(tap.osc_4076 as integer) = 1)  -- not a test account
  and p.id not in (select a.project_id from phoenix.work_queue_activity a
      join phoenix.work_queue wq on wq.id = a.work_queue_id and not wq.archived
      where a.date_exited is null and not a.archived and a.project_id is not null)  -- in no active work queue
  and pbs.base_status <> 'ON HOLD'  -- not an On Hold type

Pitfalls:

  • A snapshot as of the last load (today, UTC); the body takes no dates. The dataset holds today only, so it cannot say how the count changed.
  • Reads the base status, so Pending Change Order and Cancellation in Progress (ON HOLD types) are held here, though Customer Contact counts them active.
  • The sheet's On Hold filter opens on Yes and No; narrowing it changes the other tiles too.

Orphaned Projects With No Open Block

Orphaned Projects No Open Process Block tile; headline · target none

Also called: No Open Process Block

Definition: Orphaned projects with no process block open at all (none not archived and not Complete or Canceled).

SQL
select count(*) as value
from phoenix.project p
join phoenix.object_status pos on pos.id = p.object_status_id
join phoenix.base_status pbs on pbs.id = pos.base_status_id
where p.company_id = 1
  and not p.archived
  and pbs.base_status not in ('COMPLETE', 'CANCELED')  -- open; On Hold types count
  and not exists (select 1 from data_map_1.dm_project_data tap
    where tap.project_id = p.id and cast(tap.osc_4076 as integer) = 1)  -- not a test account
  and p.id not in (select a.project_id from phoenix.work_queue_activity a
      join phoenix.work_queue wq on wq.id = a.work_queue_id and not wq.archived
      where a.date_exited is null and not a.archived and a.project_id is not null)  -- in no active work queue
  and p.id not in (select b.project_id
      from phoenix.project_process_block b
      join phoenix.process_block pb on pb.id = b.process_block_id
      join phoenix.object_status bos on bos.id = b.object_status_id
      join phoenix.base_status bbs on bbs.id = bos.base_status_id
      where not b.archived and bbs.base_status not in ('COMPLETE', 'CANCELED'))  -- no open process block

Pitfalls:

  • A snapshot as of the last load (today, UTC); the body takes no dates. The dataset holds today only, so it cannot say how the count changed.
  • On Hold projects count here too: 14 of the 87 on 2026-12-03.

Orphaned Projects by Cleanup Bucket

Orphaned Projects By Cleanup Bucket bar, stacked by bucket group · target none

Also called: Cleanup Bucket; bucket

Definition: Orphaned projects split by what should happen to each: 1 a process issue to fix, 2 finalize, 3A to 3C missing data to review.

SQL
select x.bucket as category, count(*) as value
from (select case
    when pbs.base_status = 'ON HOLD' then '1 · Process issue: on hold, no owner'
    when e.evidence = 'R&R funded, no open blocks' then '1 · Process issue: R&R has no path to Finalized'
    when bl.service then '1 · Process issue: waiting on service work'  -- open Energization or Service Work
    when e.evidence in ('Energized + M2 funds received', 'Energized + M2 paid, M2 Funds Received blank', 'M2 paid, System Energized blank') then '2 · Finalize'
    when bl.project_id is not null then '1 · Process issue: stuck in a block'
    when p.migration_data_id is null and p.migration_external_id is null then '1 · Process issue: no blocks'  -- not from Spark
    when e.evidence in ('PTO approved, not energized or paid', 'Energized, no M2 payment recorded') then '3A · Finance review: M2 unknown'
    when e.evidence = 'Installed, nothing later recorded' and ms.install_verified <= date '2024-12-31' then '2 · Finalize'
    when e.evidence = 'Installed, nothing later recorded' then '3B · Installed 2025 or later: check'
    else '3C · Cancel' end as bucket
  from phoenix.project p
  join phoenix.object_status pos on pos.id = p.object_status_id
  join phoenix.base_status pbs on pbs.id = pos.base_status_id
  join phoenix.object_type ot on ot.id = p.object_type_id
  left join (select project_id, bool_or(process_block_name in ('Energization', 'Service Work')) as service
      from (select b.project_id, pb.process_block_name
      from phoenix.project_process_block b
      join phoenix.process_block pb on pb.id = b.process_block_id
      join phoenix.object_status bos on bos.id = b.object_status_id
      join phoenix.base_status bbs on bbs.id = bos.base_status_id
      where not b.archived and bbs.base_status not in ('COMPLETE', 'CANCELED')) ob group by 1) bl on bl.project_id = p.id  -- open blocks
  left join (select e.project_id,
      max(coalesce(e.date_value, e.timestamp_value::date)) filter (where e.object_section_component_id = 671) as install_verified,
      max(coalesce(e.date_value, e.timestamp_value::date)) filter (where e.object_section_component_id = 676) as pto_approved,
      max(coalesce(e.date_value, e.timestamp_value::date)) filter (where e.object_section_component_id = 677) as system_energized,
      max(coalesce(e.date_value, e.timestamp_value::date)) filter (where e.object_section_component_id = 686) as m2_funds_received,
      max(coalesce(e.date_value, e.timestamp_value::date)) filter (where e.object_section_component_id = 1960) as m2_invoice_paid,
      max(coalesce(e.date_value, e.timestamp_value::date)) filter (where e.object_section_component_id = 2951) as rr_all_funding
      from phoenix.project_component_entry e
      where e.object_section_component_id in (671, 676, 677, 686, 1960, 2951) and not e.archived
      group by 1) ms on ms.project_id = p.id  -- milestone dates
  left join (select distinct b.project_id from phoenix.project_process_block b
      join phoenix.process_block pb on pb.id = b.process_block_id
      join phoenix.object_status os on os.id = b.object_status_id
      where not b.archived and pb.process_block_name = 'M2 Funding' and os.object_status = 'Funds Received') m2b on m2b.project_id = p.id
  cross join lateral (select case
        when ot.object_type = 'R&R / Roof' and ms.rr_all_funding is not null and bl.project_id is null then 'R&R funded, no open blocks'
        when ms.system_energized is not null and ms.m2_funds_received is not null then 'Energized + M2 funds received'
        when ms.system_energized is not null and (m2b.project_id is not null or ms.m2_invoice_paid is not null) then 'Energized + M2 paid, M2 Funds Received blank'
        when ms.m2_funds_received is not null or m2b.project_id is not null or ms.m2_invoice_paid is not null then 'M2 paid, System Energized blank'
        when ms.system_energized is not null then 'Energized, no M2 payment recorded'
        when ms.pto_approved is not null then 'PTO approved, not energized or paid'
        when ms.install_verified is not null then 'Installed, nothing later recorded'
        else 'No completion dates' end as evidence) e
  where p.company_id = 1
    and not p.archived
    and pbs.base_status not in ('COMPLETE', 'CANCELED')  -- open; On Hold types count
    and not exists (select 1 from data_map_1.dm_project_data tap
      where tap.project_id = p.id and cast(tap.osc_4076 as integer) = 1)  -- not a test account
    and p.id not in (select a.project_id from phoenix.work_queue_activity a
        join phoenix.work_queue wq on wq.id = a.work_queue_id and not wq.archived
        where a.date_exited is null and not a.archived and a.project_id is not null)  -- in no active work queue
  ) x
group by 1
order by 1

Pitfalls:

  • A snapshot as of the last load (today, UTC); the body takes no dates. The dataset holds today only, so it cannot say how the count changed.
  • First match wins, so the order matters: an On Hold project is bucket 1 whatever its evidence, and an open Energization or Service Work block keeps an M2-paid project out of Finalize.
  • Project Closed (OSC 687) is the sale date, so it is never completion evidence.
  • On 2026-12-03 no project was in 3C Cancel or waiting on service work; the chart still lists every bucket.
  • R&R projects funded with nothing open stay in bucket 1 (no path to Finalized), 20 on 2026-12-03, until the R&R Finalized rule is decided.

Orphaned Projects by Open Process Block

Orphaned Projects By Open Process Block bar · target none

Also called: Open Process Block

Definition: Orphaned projects counted under each process block they have open; those with none under (No open process block).

SQL
select coalesce(ob.process_block_name, '(No open process block)') as category, count(distinct p.id) as value
from phoenix.project p
join phoenix.object_status pos on pos.id = p.object_status_id
join phoenix.base_status pbs on pbs.id = pos.base_status_id
left join (select b.project_id, pb.process_block_name
    from phoenix.project_process_block b
    join phoenix.process_block pb on pb.id = b.process_block_id
    join phoenix.object_status bos on bos.id = b.object_status_id
    join phoenix.base_status bbs on bbs.id = bos.base_status_id
    where not b.archived and bbs.base_status not in ('COMPLETE', 'CANCELED')) ob on ob.project_id = p.id
where p.company_id = 1
  and not p.archived
  and pbs.base_status not in ('COMPLETE', 'CANCELED')  -- open; On Hold types count
  and not exists (select 1 from data_map_1.dm_project_data tap
    where tap.project_id = p.id and cast(tap.osc_4076 as integer) = 1)  -- not a test account
  and p.id not in (select a.project_id from phoenix.work_queue_activity a
      join phoenix.work_queue wq on wq.id = a.work_queue_id and not wq.archived
      where a.date_exited is null and not a.archived and a.project_id is not null)  -- in no active work queue
group by 1
order by value desc

Pitfalls:

  • A snapshot as of the last load (today, UTC); the body takes no dates. The dataset holds today only, so it cannot say how the count changed.
  • A project with two blocks open counts under each, so the bars add up to more than the orphaned total.

Material Order On-Time Rate

Procurement Daily Ordering: Order On-Time Rate tile; Order On-Time Rate by Install Week line; Last 8 Install Weeks periods; rate on Orders by Work Type · target 90% (placeholder)

Also called: Order On-Time Rate; on-time ordering

Definition: Share of appointments starting in the range whose materials were ordered by the due time: 8 days before the start, or when the job became orderable if later, plus a day.

SQL
select count(*) filter (where a.ordered_at <= d.due)::numeric / nullif(count(*) filter (where a.ready_at is not null and a.ordered_at is not null), 0) as value,
  count(*) filter (where a.ordered_at <= d.due) as num, count(*) filter (where a.ready_at is not null and a.ordered_at is not null) as den
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due

Pitfalls:

  • The order is due 8 days before the start, or when the appointment first entered Ready to Order Materials if that is later, plus 1 day, all in calendar days and to the minute (Michael Lowry, 2026-11-30); the 90% target is a placeholder.
  • Times come from the appointment's status history: the first entry into Ready to Order Materials (status 140) and the first into Confirm Delivery Date (status 141, set by Materials Ordered). The typed Material Ordered Date is not used.
  • Counts only appointments that were ordered; one still waiting is on the At-Risk list instead, and one that never entered Ready to Order Materials (no order needed) is left out.
  • By the appointment's start date (UTC), not the day ordered; Lumen's data starts 2026-01-01. Install, ESC, Correction Work, Service and Structural Upgrade appointments, test accounts and archived projects left out; the Work Type and State filters narrow every Ordering and Deliveries figure.
  • The line reads the last 12 install weeks and the periods table the last 8, Monday to Sunday, whatever the range.

Material Orders Placed

Procurement Daily Ordering: Last 8 Install Weeks periods, Orders Placed; Orders by Work Type bar (On Time and Late stacks) · target none

Also called: Orders Placed

Definition: Appointments starting in the range that became orderable and had their materials ordered.

SQL
select count(*) as value
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due
where a.ready_at is not null and a.ordered_at is not null  -- orderable and ordered

Pitfalls:

  • Counts appointments by start date, not orders by the day placed.
  • Not the Weekly KPI Report's Orders row.
  • Counts only appointments that were ordered; one still waiting is on the At-Risk list instead, and one that never entered Ready to Order Materials (no order needed) is left out.
  • By the appointment's start date (UTC), not the day ordered; Lumen's data starts 2026-01-01. Install, ESC, Correction Work, Service and Structural Upgrade appointments, test accounts and archived projects left out; the Work Type and State filters narrow every Ordering and Deliveries figure.

Late Material Orders

Procurement Daily Ordering: Late Orders tile · target none
Procurement Daily Lists: Late Orders table (the rows) · target none

Also called: Late Orders

Definition: Appointments starting in the range whose materials were ordered after the due time.

SQL
select count(*) as value
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due
where a.ready_at is not null
  and a.ordered_at > d.due  -- after the due time

Pitfalls:

  • The order is due 8 days before the start, or when the appointment first entered Ready to Order Materials if that is later, plus 1 day, all in calendar days and to the minute (Michael Lowry, 2026-11-30); the 90% target is a placeholder.
  • By the appointment's start date (UTC), not the day ordered; Lumen's data starts 2026-01-01. Install, ESC, Correction Work, Service and Structural Upgrade appointments, test accounts and archived projects left out; the Work Type and State filters narrow every Ordering and Deliveries figure.

Median Days Late, Material Orders

Procurement Daily Ordering: Median Days Late tile · target none

Also called: Median Days Late; Days Late

Definition: For late material orders on appointments starting in the range, the median days from the due time to the order.

SQL
select percentile_cont(0.5) within group (order by round((extract(epoch from (a.ordered_at - d.due)) / 86400)::numeric, 1)) as value  -- days, to a tenth
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due
where a.ready_at is not null
  and a.ordered_at > d.due

Pitfalls:

  • Each order's lateness is rounded to a tenth of a day before the median, as the dataset stores it; October 2026's median was 0.6 days, so most late orders miss by hours.
  • The order is due 8 days before the start, or when the appointment first entered Ready to Order Materials if that is later, plus 1 day, all in calendar days and to the minute (Michael Lowry, 2026-11-30); the 90% target is a placeholder.

Short-Notice Jobs

Procurement Daily Ordering: Short-Notice Jobs tile; Last 8 Install Weeks periods · target none
Procurement Daily Deliveries and Churn: Short-Notice Jobs by State bar (the count per state) · target none

Also called: Short-Notice Jobs; short notice

Definition: Share of appointments starting in the range that became orderable less than 8 days before they started.

SQL
select count(*) filter (where a.ready_at > a.start_time - interval '8 days')::numeric / nullif(count(*) filter (where a.ready_at is not null), 0) as value,
  count(*) filter (where a.ready_at > a.start_time - interval '8 days') as num, count(*) filter (where a.ready_at is not null) as den
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due

Pitfalls:

  • Over every appointment that entered Ready to Order Materials, ordered or not, so its base is wider than the on-time rate's.
  • The by-state bar counts short-notice appointments, not the share.
  • By the appointment's start date (UTC), not the day ordered; Lumen's data starts 2026-01-01. Install, ESC, Correction Work, Service and Structural Upgrade appointments, test accounts and archived projects left out; the Work Type and State filters narrow every Ordering and Deliveries figure.

Material Order On-Time Rate, Normal Notice

Procurement Daily Ordering: On Time by Notice: On Time, Normal Notice · target 90% (placeholder)

Also called: On Time, Normal Notice

Definition: The on-time ordering rate for appointments that became orderable 8 or more days before they started.

SQL
select count(*) filter (where a.ordered_at <= d.due)::numeric / nullif(count(*) filter (where a.ready_at is not null and a.ordered_at is not null), 0) as value,
  count(*) filter (where a.ordered_at <= d.due) as num, count(*) filter (where a.ready_at is not null and a.ordered_at is not null) as den
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due
where a.ready_at <= a.start_time - interval '8 days'  -- orderable 8 or more days ahead

Pitfalls:

  • Judged from 8 days before the start, so the weeks a job rightly waits never count against it.
  • Counts only appointments that were ordered; one still waiting is on the At-Risk list instead, and one that never entered Ready to Order Materials (no order needed) is left out.

Material Order On-Time Rate, Short Notice

Procurement Daily Ordering: On Time by Notice: On Time, Short Notice · target 90% (placeholder)

Also called: On Time, Short Notice

Definition: The on-time ordering rate for appointments that became orderable less than 8 days before they started, judged from when they became orderable.

SQL
select count(*) filter (where a.ordered_at <= d.due)::numeric / nullif(count(*) filter (where a.ready_at is not null and a.ordered_at is not null), 0) as value,
  count(*) filter (where a.ordered_at <= d.due) as num, count(*) filter (where a.ready_at is not null and a.ordered_at is not null) as den
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due
where a.ready_at > a.start_time - interval '8 days'  -- short notice

Pitfalls:

  • Judged from the moment the job became orderable plus a day, so it can run higher than the normal-notice rate (October 2026: 84.8% against 77.6%).
  • Counts only appointments that were ordered; one still waiting is on the At-Risk list instead, and one that never entered Ready to Order Materials (no order needed) is left out.

Material Order Lead at Start

Procurement Daily Ordering: Order Lead at Start tile; Last 8 Install Weeks periods · target none

Also called: Order Lead at Start; Order Lead

Definition: Median days from the material order to the appointment's start, for ordered appointments starting in the range.

SQL
select percentile_cont(0.5) within group (order by round((extract(epoch from (a.start_time - a.ordered_at)) / 86400)::numeric, 1)) as value  -- days, to a tenth
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due
where a.ordered_at is not null  -- ordered

Pitfalls:

  • Takes every ordered appointment, including one that never passed through Ready to Order Materials, so its base can be wider than Orders Placed.
  • An order placed after the start reads negative.
  • By the appointment's start date (UTC), not the day ordered; Lumen's data starts 2026-01-01. Install, ESC, Correction Work, Service and Structural Upgrade appointments, test accounts and archived projects left out; the Work Type and State filters narrow every Ordering and Deliveries figure.

At-Risk Appointments, Materials

Procurement Daily Ordering: At-Risk Appointments tile · target none
Procurement Daily Lists: At-Risk Appointments table (the rows) · target none

Also called: At-Risk Appointments

Definition: Appointments starting today through 10 days from today still waiting on permits, a material order or a delivery date.

SQL
select count(*) as value
from phoenix.project_process_block_event ev
join data_map_1.dm_project_data p on p.project_id = ev.project_id
join phoenix.object_status os on os.id = ev.object_status_id
where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
  and not ev.archived and not p.archived
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and ev.start_time >= (now() at time zone 'UTC')::date and ev.start_time < (now() at time zone 'UTC')::date + 11  -- starts today to 10 days out
  and os.object_status in ('Pending Permit Approval', 'Ready to Order Materials', 'Confirm Delivery Date')  -- still waiting

Pitfalls:

  • A snapshot as of the last load, by the appointment's status then; the body takes no dates and ignores the range.
  • Today is the UTC day, so in the evening Mountain time the window already starts tomorrow.
  • Pending Permit Approval counts as at risk even though ordering cannot start until the permit is approved.

Material Order to Delivery Confirmed

Procurement Daily Deliveries and Churn: Order to Delivery Confirmed tile · target none

Also called: Order to Delivery Confirmed

Definition: Median days from the material order to the delivery date being confirmed, for appointments starting in the range.

SQL
select percentile_cont(0.5) within group (order by round((extract(epoch from (a.confirmed_at - a.ordered_at)) / 86400)::numeric, 1)) as value  -- days, to a tenth
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at, cf.confirmed_at
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  left join (select o2.eid, min(coalesce(c.changed_at, c.date_created)) as confirmed_at
      from (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
          coalesce(h.changed_at, h.date_created) as ordered_at
        from phoenix.project_process_block_event_audit h
        where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
        order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o2
      join phoenix.project_process_block_event_audit c on c.project_process_block_event_id = o2.eid and c.object_status_id = 52  -- Pending Event, set by Delivery Date Confirmed
        and coalesce(c.changed_at, c.date_created) > o2.ordered_at
      group by 1) cf on cf.eid = ev.id  -- first delivery confirmation after the order
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due
where a.confirmed_at is not null

Pitfalls:

  • Confirmed is the first move to Pending Event (status 52, set by Delivery Date Confirmed) after the order. October 2026's median was 0.0 days: at least half were confirmed within about an hour of the order, so this reads the clicks, not the supplier.
  • By the appointment's start date (UTC), not the day ordered; Lumen's data starts 2026-01-01. Install, ESC, Correction Work, Service and Structural Upgrade appointments, test accounts and archived projects left out; the Work Type and State filters narrow every Ordering and Deliveries figure.

Delivery Confirmed by Start

Procurement Daily Deliveries and Churn: Delivery Confirmed by Start tile · target none

Also called: Delivery Confirmed by Start

Definition: Share of ordered appointments starting in the range, and started by today, whose delivery was confirmed before the start time.

SQL
select count(*) filter (where a.confirmed_at <= a.start_time)::numeric / nullif(count(*), 0) as value,
  count(*) filter (where a.confirmed_at <= a.start_time) as num, count(*) as den
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at, cf.confirmed_at
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  left join (select o2.eid, min(coalesce(c.changed_at, c.date_created)) as confirmed_at
      from (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
          coalesce(h.changed_at, h.date_created) as ordered_at
        from phoenix.project_process_block_event_audit h
        where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
        order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o2
      join phoenix.project_process_block_event_audit c on c.project_process_block_event_id = o2.eid and c.object_status_id = 52  -- Pending Event, set by Delivery Date Confirmed
        and coalesce(c.changed_at, c.date_created) > o2.ordered_at
      group by 1) cf on cf.eid = ev.id  -- first delivery confirmation after the order
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due
where a.ordered_at is not null  -- ordered
  and a.start_time::date <= (now() at time zone 'UTC')::date  -- started by today

Pitfalls:

  • Leaves out appointments not yet started, so the current week's figure fills in as days pass.
  • By the appointment's start date (UTC), not the day ordered; Lumen's data starts 2026-01-01. Install, ESC, Correction Work, Service and Structural Upgrade appointments, test accounts and archived projects left out; the Work Type and State filters narrow every Ordering and Deliveries figure.

Urgent Material Jobs

Procurement Daily Deliveries and Churn: Urgent Jobs tile · target none

Also called: Urgent Jobs

Definition: Appointments starting in the range that became orderable less than 3 days before they started.

SQL
select count(*) as value
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due
where a.ready_at > a.start_time - interval '3 days'  -- orderable under 3 days ahead

Pitfalls:

  • The 3-day window Alert Procurement for Sudden Install watches; a subset of Short-Notice Jobs, but a count where that is a share.
  • By the appointment's start date (UTC), not the day ordered; Lumen's data starts 2026-01-01. Install, ESC, Correction Work, Service and Structural Upgrade appointments, test accounts and archived projects left out; the Work Type and State filters narrow every Ordering and Deliveries figure.

Material Deliveries Rescheduled

Procurement Daily Deliveries and Churn: Deliveries Rescheduled tile · target none

Also called: Deliveries Rescheduled

Definition: Appointments starting in the range that ever went to Reschedule Material Delivery.

SQL
select count(*) as value
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due
where a.rescheduled = 1  -- ever in Reschedule Material Delivery

Pitfalls:

  • Counts appointments, once each however many times they went back.
  • By the appointment's start date (UTC), not the day ordered; Lumen's data starts 2026-01-01. Install, ESC, Correction Work, Service and Structural Upgrade appointments, test accounts and archived projects left out; the Work Type and State filters narrow every Ordering and Deliveries figure.

Materials Dispositioned

Procurement Daily Deliveries and Churn: Materials Dispositioned tile · target none

Also called: Materials Dispositioned

Definition: Appointments starting in the range that ever went to Disposition Materials after a call-off or no-show.

SQL
select count(*) as value
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due
where a.dispositioned = 1  -- ever in Disposition Materials

Pitfalls:

  • By the appointment's start date (UTC), not the day ordered; Lumen's data starts 2026-01-01. Install, ESC, Correction Work, Service and Structural Upgrade appointments, test accounts and archived projects left out; the Work Type and State filters narrow every Ordering and Deliveries figure.

Material Failures

Procurement Daily Deliveries and Churn: Material Failures tile; Material Failures by Work Type bar · target none

Also called: Material Failures

Definition: Install, ESC and Correction Work visits starting in the range whose outcome blames equipment not delivered, incorrect or missing.

SQL
select count(*) as value
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at,
    case when ev.event_id in (41, 43, 44) then case when 852 = i.osc_1930 or 1643 = any(i.osc_1051) or 1655 = any(i.osc_1052)
        or 869 = x.osc_1968 or 439 = any(x.osc_826) or 434 = any(x.osc_825)
        or 891 = w.osc_2002 or 521 = any(w.osc_1055) or 516 = any(w.osc_1056) then 1 else 0 end end as material_failure
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  left join data_map_1.dm_ev_41_data i on i.project_process_block_event_id = ev.id
  left join data_map_1.dm_ev_43_data x on x.project_process_block_event_id = ev.id
  left join data_map_1.dm_ev_44_data w on w.project_process_block_event_id = ev.id
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due
where a.material_failure = 1

Pitfalls:

  • Reads the outcome fields: Install's Site Not Visited reason (list value 852) and Work Not Started or Incomplete reasons (1643, 1655); ESC's (869, 439, 434); Correction Work's (891, 521, 516). Service and Structural Upgrade carry no such field.
  • Counts visits, not projects; whether the outcome was typed is up to the crew.
  • By the appointment's start date (UTC), not the day ordered; Lumen's data starts 2026-01-01. Install, ESC, Correction Work, Service and Structural Upgrade appointments, test accounts and archived projects left out; the Work Type and State filters narrow every Ordering and Deliveries figure.

Material Cost per Watt

Procurement Daily Material Cost: Material Cost per Watt tile; Cost per Watt by Install Date line; Cost per Watt and Coverage by Month periods; Cost per Watt by State board · target none

Also called: Material Cost per Watt; cost per watt; CPW

Definition: Average material cost per watt of projects whose installation started in the range, over those with an invoice entered.

SQL
select avg(round((v.invoices - coalesce(p.osc_3909, 0)) / nullif(v.watts, 0), 3)) as value  -- dollars per watt
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_11_data i on i.project_id = p.project_id and i.main  -- main Installation block
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main  -- main Contract block
cross join lateral (select coalesce(p.osc_3799, 0) + coalesce(p.osc_3802, 0) + coalesce(p.osc_3805, 0) + coalesce(p.osc_3808, 0)
    + coalesce(p.osc_10331, 0) + coalesce(p.osc_10334, 0) + coalesce(p.osc_10337, 0) as invoices,  -- Invoice 1 to 7 Amount
  coalesce(nullif(i.osc_1349 * 1000, 0), c.osc_35 * 1000) as watts) v  -- Installed System Size, else System Size
where not p.archived
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_669::date between :start_date and :end_date  -- Installation Started
  and v.invoices > 0  -- an invoice entered

Pitfalls:

  • Albatross's own cost-per-watt formula: Invoice 1 to 7 Amount less Material Credit Memo (OSC 3909), over Installed System Size (kW, OSC 1349) × 1000, else the Contract's System Size (kW, OSC 35) × 1000, each project rounded to 3 places, then averaged (not total cost over total watts).
  • Invoices arrive weeks after an install, so recent months average only what has been invoiced; read it beside Costs Entered (October 2026: 71%).
  • By Installation Started (OSC 669), so the range filter on the page (appointment start) does not apply; only State narrows it.

Material Costs Entered

Procurement Daily Material Cost: Costs Entered tile; Cost per Watt and Coverage by Month periods; Cost per Watt by State board · target none

Also called: Costs Entered

Definition: Share of projects whose installation started in the range with at least one material invoice entered.

SQL
select count(*) filter (where v.invoices > 0)::numeric / nullif(count(*), 0) as value,
  count(*) filter (where v.invoices > 0) as num, count(*) as den
from data_map_1.dm_project_data p
left join data_map_1.dm_pb_11_data i on i.project_id = p.project_id and i.main  -- main Installation block
left join data_map_1.dm_pb_3_data c on c.project_id = p.project_id and c.main  -- main Contract block
cross join lateral (select coalesce(p.osc_3799, 0) + coalesce(p.osc_3802, 0) + coalesce(p.osc_3805, 0) + coalesce(p.osc_3808, 0)
    + coalesce(p.osc_10331, 0) + coalesce(p.osc_10334, 0) + coalesce(p.osc_10337, 0) as invoices,  -- Invoice 1 to 7 Amount
  coalesce(nullif(i.osc_1349 * 1000, 0), c.osc_35 * 1000) as watts) v  -- Installed System Size, else System Size
where not p.archived
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_669::date between :start_date and :end_date  -- Installation Started

Pitfalls:

  • A project with an invoice but no system size counts as entered yet has no cost per watt.

Panels Sold

Procurement Daily Panels: Panels Sold by SKU bar · target none

Sale date: Submitted (OSC 660). It counts or times from when the project was submitted to Albatross, not from when it Sold (Closed, OSC 687). See Sale dates.

Also called: Panels Sold

Definition: Panels on the current design of projects submitted in the range.

SQL
select sum(d.osc_915) as value  -- Designed Panel Quantity
from data_map_1.dm_project_data p
join data_map_1.dm_pb_5_data d on d.project_id = p.project_id and d.main  -- main Design block
where not p.archived
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and p.osc_660::date between :start_date and :end_date  -- Project Submitted

Pitfalls:

  • Dated by Project Submitted (OSC 660), the day a project was submitted to Albatross, so it counts submissions, not sales (Deal Review complete, Project Closed, OSC 687). It is the date Albatross's own Procurement tab uses.
  • Each project once, on its main Design block; Albatross's Panels Sold table sums every Design block, so a redesigned project counts twice there (October 2026: 1,535 there, 1,380 here).
  • A project with no main Design block drops out; canceled projects stay in.

Panels Scheduled

Procurement Daily Panels: Panels on Scheduled Installs board, Next 14 Days and Next 30 Days · target none

Also called: Panels Scheduled; Panels on Scheduled Installs

Definition: Panels needed by open install appointments starting in the range, from each project's current design.

SQL
select sum(a.panels) as value
from (select ev.id, ev.event_id, ev.start_time, os.object_status as status,
    st.ready_at, st.rescheduled, st.dispositioned, o.ordered_at, dsg.osc_915 as panels
  from phoenix.project_process_block_event ev
  join data_map_1.dm_project_data p on p.project_id = ev.project_id
  join phoenix.object_status os on os.id = ev.object_status_id  -- the appointment's status now
  left join (select h.project_process_block_event_id as eid,
      min(coalesce(h.changed_at, h.date_created)) filter (where h.object_status_id = 140) as ready_at,  -- first Ready to Order Materials
      max(case when h.object_status_id = 142 then 1 else 0 end) as rescheduled,  -- Reschedule Material Delivery
      max(case when h.object_status_id = 144 then 1 else 0 end) as dispositioned  -- Disposition Materials
    from phoenix.project_process_block_event_audit h where h.object_status_id in (140, 142, 144) group by 1) st on st.eid = ev.id
  left join (select distinct on (h.project_process_block_event_id) h.project_process_block_event_id as eid,
        coalesce(h.changed_at, h.date_created) as ordered_at
      from phoenix.project_process_block_event_audit h
      where h.object_status_id = 141  -- Confirm Delivery Date, set by Materials Ordered
      order by h.project_process_block_event_id, coalesce(h.changed_at, h.date_created), h.id) o on o.eid = ev.id  -- first order
  left join data_map_1.dm_pb_5_data dsg on dsg.project_id = ev.project_id and dsg.main  -- main Design block
  where ev.event_id in (41, 43, 44, 45, 161)  -- Install, ESC, Correction Work, Service, Structural Upgrade
    and not ev.archived and not p.archived
    and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
    and ev.start_time >= :start_date and ev.start_time < :end_date::date + 1  -- appointment start
  ) a
cross join lateral (select greatest(a.ready_at, a.start_time - interval '8 days') + interval '1 day' as due) d  -- order due
where a.event_id = 41  -- Install
  and a.status not in ('Complete', 'Canceled', 'Rescheduled', 'Called Off', 'No Show')  -- still open

Pitfalls:

  • The board reads the next 14 and 30 days from today whatever the range.
  • A project with two open install appointments counts its panels twice.
  • Only Complete, Canceled, Rescheduled, Called Off and No Show close an appointment, so Exception counts as open: of October 2026's 441 install appointments, 123 sat in Exception on 2026-12-03, and a past range's 2,962 panels are not panels still to install.

Procurement Queue Items

Procurement Daily Work Queues: In Queue tile; Procurement Queues board, In Queue · target none
Procurement Daily Work Queues: Material Status tile (the Material Status row) · target none

Also called: In Queue; Material Status

Definition: Items open in each Procurement work queue now, with the total.

SQL
select coalesce(wq.work_queue_name, 'All Procurement queues') as category, count(*) as value
from phoenix.work_queue_activity wqa
join phoenix.work_queue wq on wq.id = wqa.work_queue_id
left join data_map_1.dm_project_data p on p.project_id = wqa.project_id
where wq.work_queue_type_id = 21  -- Procurement queues
  and not wq.archived
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and wqa.date_exited is null  -- still in the queue
group by rollup (wq.work_queue_name)
order by 1

Pitfalls:

  • A snapshot of open stints at the last load; the body takes no dates. Counts stints, so a project in two Procurement queues counts in each.
  • Material Status, a holding queue for projects waiting on a field visit, holds most of them (223 of 253 on 2026-12-03).

Procurement Queue Median Wait

Procurement Daily Work Queues: Procurement Queues board, Median Wait · target none

Also called: Median Wait

Definition: Per Procurement queue, the median calendar days its open items have waited so far.

SQL
select wq.work_queue_name as category, percentile_cont(0.5) within group (order by round((extract(epoch from ((now() at time zone 'UTC') - wqa.date_entered)) / 86400)::numeric, 1)) as value  -- days
from phoenix.work_queue_activity wqa
join phoenix.work_queue wq on wq.id = wqa.work_queue_id
left join data_map_1.dm_project_data p on p.project_id = wqa.project_id
where wq.work_queue_type_id = 21  -- Procurement queues
  and not wq.archived
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and wqa.date_exited is null  -- still in the queue
group by 1
order by 1

Pitfalls:

  • A snapshot of open stints at the last load; the body takes no dates. Counts stints, so a project in two Procurement queues counts in each.
  • Calendar days to a tenth, to the load time; no total.

Procurement Queue Oldest Item

Procurement Daily Work Queues: Procurement Queues board, Oldest · target none

Also called: Oldest

Definition: Per Procurement queue, the calendar days the longest-waiting open item has been there.

SQL
select wq.work_queue_name as category, max(round((extract(epoch from ((now() at time zone 'UTC') - wqa.date_entered)) / 86400)::numeric, 1)) as value  -- days
from phoenix.work_queue_activity wqa
join phoenix.work_queue wq on wq.id = wqa.work_queue_id
left join data_map_1.dm_project_data p on p.project_id = wqa.project_id
where wq.work_queue_type_id = 21  -- Procurement queues
  and not wq.archived
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and wqa.date_exited is null  -- still in the queue
group by 1
order by 1

Pitfalls:

  • A snapshot of open stints at the last load; the body takes no dates. Counts stints, so a project in two Procurement queues counts in each.
  • Material Status's oldest had waited 282 days on 2026-12-03.

Procurement Queue Items Past SLA

Procurement Daily Work Queues: Past SLA tile; Procurement Queues board, Past SLA · target none

Also called: Past SLA

Definition: Open Procurement queue items that have waited longer than their queue's SLA target, per queue and in total.

SQL
select coalesce(wq.work_queue_name, 'All Procurement queues') as category, count(*) as value
from phoenix.work_queue_activity wqa
join phoenix.work_queue wq on wq.id = wqa.work_queue_id
left join data_map_1.dm_project_data p on p.project_id = wqa.project_id
where wq.work_queue_type_id = 21  -- Procurement queues
  and not wq.archived
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and wqa.date_exited is null  -- still in the queue
  and wq.work_queue_name <> 'Material Status' and not wq.exclude_from_wqt_metrics  -- holding queues have no SLA
  and (now() at time zone 'UTC') - wqa.date_entered > make_interval(days => wq.sla_target)  -- past the queue's own target
group by rollup (wq.work_queue_name)
order by 1

Pitfalls:

  • A snapshot of open stints at the last load; the body takes no dates. Counts stints, so a project in two Procurement queues counts in each.
  • Uses each queue's own SLA target (1 to 10) as calendar days; the sheet's words say 7 days for every queue, which is wrong (Confirm Install Delivery Date and the Reschedule queues are 1, Ready to Order Install Materials 7, Install Call Off 10). The SLA Dashboard reads the same targets as working days.
  • Material Status and Pending Permit Approval Before Ordering are never past SLA.
  • On the Ready to Order queues a job scheduled weeks out waits there on purpose, so Past SLA reads high there by design.

Procurement Queue Items Completed

Procurement Daily Work Queues: Procurement Queues board, Completed · target none

Also called: Completed

Definition: Items that left each Procurement work queue in the range, with the total.

SQL
select coalesce(wq.work_queue_name, 'All Procurement queues') as category, count(*) as value
from phoenix.work_queue_activity wqa
join phoenix.work_queue wq on wq.id = wqa.work_queue_id
left join data_map_1.dm_project_data p on p.project_id = wqa.project_id
where wq.work_queue_type_id = 21  -- Procurement queues
  and not wq.archived
  and coalesce(cast(p.osc_4076 as integer), 0) = 0  -- not a test account
  and wqa.date_exited::date between :start_date and :end_date  -- left the queue (UTC day)
group by rollup (wq.work_queue_name)
order by 1

Pitfalls:

  • Counts stints by the day they left, Material Status included (666 of October 2026's 1,448).
  • The board's other columns are snapshots; only this one follows the range.

Contacted in Last 7 Days

Customer Contact Customer Contact: Contacted in Last 7 Days tile; headline · target every active customer weekly (Michael Lowry, 2026-11-30)

Also called: Contacted in Last 7 Days; heard from us this week

Definition: Share of active customers we called or texted at least once in the last 7 days.

SQL
select count(*) filter (where (now() at time zone 'UTC')::date - lo.last_at::date < 7)::numeric / nullif(count(*), 0) as value,
  count(*) filter (where (now() at time zone 'UTC')::date - lo.last_at::date < 7) as num, count(*) as den
from (select p.id, p.date_created
  from phoenix.project p
  join phoenix.object_status os on os.id = p.object_status_id
  join phoenix.base_status b on b.id = os.base_status_id
  where p.company_id = 1 and not p.archived
    and b.base_status not in ('COMPLETE', 'CANCELED')  -- not Finalized or Canceled
    and os.object_status not in ('On Hold', 'Legal Hold', 'Sales Hold')  -- other holds stay active
    and p.date_created < now() - interval '7 days'  -- created more than 7 days ago
    and not exists (select 1 from data_map_1.dm_project_data tap
    where tap.project_id = p.id and cast(tap.osc_4076 as integer) = 1)  -- not a test account
  ) ap
left join (select c.project_id, max(c.date_created) as last_at
    from phoenix.communication c
    where c.direction = 'outgoing' and c.project_id is not null  -- our CloudTalk calls and texts
    group by 1) lo on lo.project_id = ap.id

Pitfalls:

  • A snapshot as of the last load (UTC days); the body takes no dates and the sheet's range moves only the weekly line.
  • Last 7 days means the last outgoing contact was 0 to 6 UTC days before today.
  • Active means not archived, project status not Finalized, Canceled, On Hold, Legal Hold or Sales Hold, and created more than 7 days ago; Pending Change Order, Cancellation in Progress and the other ON HOLD statuses count as active. Test accounts left out.
  • Only an outgoing CloudTalk call or text logged on the project counts: emails, calls outside CloudTalk and calls not linked to a project (about 39% of October 2026's outgoing calls had no project) never reset the clock, and nor does the customer calling us.
  • Customer-level, not the Weekly KPI Report's Inbound Calls or answer rates, which read the phone queue.

No 7-Day Contact Gap in 30 Days

Customer Contact Customer Contact: No 7-Day Gap in 30 Days tile · target none

Also called: No 7-Day Gap in 30 Days

Definition: Share of active customers who never went more than 7 days without an outgoing call or text over the last 30 days.

SQL
select count(*) filter (where case when g.project_id is null then now() - s.t
      else greatest(g.first_t - s.t, coalesce(g.inner_gap, interval '0'), now() - g.last_t) end <= interval '7 days')::numeric / nullif(count(*), 0) as value,
  count(*) filter (where case when g.project_id is null then now() - s.t
      else greatest(g.first_t - s.t, coalesce(g.inner_gap, interval '0'), now() - g.last_t) end <= interval '7 days') as num, count(*) as den
from (select p.id, p.date_created
  from phoenix.project p
  join phoenix.object_status os on os.id = p.object_status_id
  join phoenix.base_status b on b.id = os.base_status_id
  where p.company_id = 1 and not p.archived
    and b.base_status not in ('COMPLETE', 'CANCELED')  -- not Finalized or Canceled
    and os.object_status not in ('On Hold', 'Legal Hold', 'Sales Hold')  -- other holds stay active
    and p.date_created < now() - interval '7 days'  -- created more than 7 days ago
    and not exists (select 1 from data_map_1.dm_project_data tap
    where tap.project_id = p.id and cast(tap.osc_4076 as integer) = 1)  -- not a test account
  ) ap
left join (select c.project_id, max(c.date_created) as last_at
    from phoenix.communication c
    where c.direction = 'outgoing' and c.project_id is not null  -- our CloudTalk calls and texts
    group by 1) lo on lo.project_id = ap.id
left join (select project_id, min(t) as first_t, max(t) as last_t, max(t - pt) as inner_gap
    from (select c.project_id, c.date_created as t,
        lag(c.date_created) over (partition by c.project_id order by c.date_created) as pt
      from phoenix.communication c
      where c.direction = 'outgoing' and c.date_created >= now() - interval '30 days') x
    group by 1) g on g.project_id = ap.id  -- outgoing contacts in the last 30 days
cross join lateral (select greatest(now() - interval '30 days', ap.date_created) as t) s  -- the window's start

Pitfalls:

  • A snapshot as of the last load (UTC days); the body takes no dates and the sheet's range moves only the weekly line.
  • Measured to the minute and counted to now, so the stretch since the last contact counts: a project contacted every 6 days but not for the last 8 fails.
  • Far stricter than Contacted in Last 7 Days: 2.5% of active customers on 2026-12-03, against 35%.
  • Active means not archived, project status not Finalized, Canceled, On Hold, Legal Hold or Sales Hold, and created more than 7 days ago; Pending Change Order, Cancellation in Progress and the other ON HOLD statuses count as active. Test accounts left out.
  • Only an outgoing CloudTalk call or text logged on the project counts: emails, calls outside CloudTalk and calls not linked to a project (about 39% of October 2026's outgoing calls had no project) never reset the clock, and nor does the customer calling us.

Not Contacted in 7 Days

Customer Contact Customer Contact: Not Contacted in 7 Days tile; headline · target none
Customer Contact Customer Contact: Not Contacted in 7 Days table (the rows) · target none

Also called: Not Contacted in 7 Days

Definition: Active customers with no outgoing call or text in the last 7 days, never-contacted ones included.

SQL
select count(*) as value
from (select p.id, p.date_created
  from phoenix.project p
  join phoenix.object_status os on os.id = p.object_status_id
  join phoenix.base_status b on b.id = os.base_status_id
  where p.company_id = 1 and not p.archived
    and b.base_status not in ('COMPLETE', 'CANCELED')  -- not Finalized or Canceled
    and os.object_status not in ('On Hold', 'Legal Hold', 'Sales Hold')  -- other holds stay active
    and p.date_created < now() - interval '7 days'  -- created more than 7 days ago
    and not exists (select 1 from data_map_1.dm_project_data tap
    where tap.project_id = p.id and cast(tap.osc_4076 as integer) = 1)  -- not a test account
  ) ap
left join (select c.project_id, max(c.date_created) as last_at
    from phoenix.communication c
    where c.direction = 'outgoing' and c.project_id is not null  -- our CloudTalk calls and texts
    group by 1) lo on lo.project_id = ap.id
where lo.project_id is null or (now() at time zone 'UTC')::date - lo.last_at::date >= 7  -- none in 7 days, or never

Pitfalls:

  • A snapshot as of the last load (UTC days); the body takes no dates and the sheet's range moves only the weekly line.
  • Active means not archived, project status not Finalized, Canceled, On Hold, Legal Hold or Sales Hold, and created more than 7 days ago; Pending Change Order, Cancellation in Progress and the other ON HOLD statuses count as active. Test accounts left out.
  • Only an outgoing CloudTalk call or text logged on the project counts: emails, calls outside CloudTalk and calls not linked to a project (about 39% of October 2026's outgoing calls had no project) never reset the clock, and nor does the customer calling us.

Never Contacted

Customer Contact Customer Contact: Never Contacted tile; headline · target none

Also called: Never Contacted; No outreach

Definition: Active customers with no outgoing call or text on record at all.

SQL
select count(*) as value
from (select p.id, p.date_created
  from phoenix.project p
  join phoenix.object_status os on os.id = p.object_status_id
  join phoenix.base_status b on b.id = os.base_status_id
  where p.company_id = 1 and not p.archived
    and b.base_status not in ('COMPLETE', 'CANCELED')  -- not Finalized or Canceled
    and os.object_status not in ('On Hold', 'Legal Hold', 'Sales Hold')  -- other holds stay active
    and p.date_created < now() - interval '7 days'  -- created more than 7 days ago
    and not exists (select 1 from data_map_1.dm_project_data tap
    where tap.project_id = p.id and cast(tap.osc_4076 as integer) = 1)  -- not a test account
  ) ap
left join (select c.project_id, max(c.date_created) as last_at
    from phoenix.communication c
    where c.direction = 'outgoing' and c.project_id is not null  -- our CloudTalk calls and texts
    group by 1) lo on lo.project_id = ap.id
where lo.project_id is null  -- no outgoing contact ever

Pitfalls:

  • A snapshot as of the last load (UTC days); the body takes no dates and the sheet's range moves only the weekly line.
  • Only an outgoing CloudTalk call or text logged on the project counts: emails, calls outside CloudTalk and calls not linked to a project (about 39% of October 2026's outgoing calls had no project) never reset the clock, and nor does the customer calling us.
  • Active means not archived, project status not Finalized, Canceled, On Hold, Legal Hold or Sales Hold, and created more than 7 days ago; Pending Change Order, Cancellation in Progress and the other ON HOLD statuses count as active. Test accounts left out.

Median Days Since Contact

Customer Contact Customer Contact: Median Days Since Contact tile · target none

Also called: Median Days Since Contact; Days Since Contact

Definition: Median UTC days since our last outgoing call or text, across active customers we have contacted.

SQL
select percentile_cont(0.5) within group (order by (now() at time zone 'UTC')::date - lo.last_at::date) as value  -- days
from (select p.id, p.date_created
  from phoenix.project p
  join phoenix.object_status os on os.id = p.object_status_id
  join phoenix.base_status b on b.id = os.base_status_id
  where p.company_id = 1 and not p.archived
    and b.base_status not in ('COMPLETE', 'CANCELED')  -- not Finalized or Canceled
    and os.object_status not in ('On Hold', 'Legal Hold', 'Sales Hold')  -- other holds stay active
    and p.date_created < now() - interval '7 days'  -- created more than 7 days ago
    and not exists (select 1 from data_map_1.dm_project_data tap
    where tap.project_id = p.id and cast(tap.osc_4076 as integer) = 1)  -- not a test account
  ) ap
left join (select c.project_id, max(c.date_created) as last_at
    from phoenix.communication c
    where c.direction = 'outgoing' and c.project_id is not null  -- our CloudTalk calls and texts
    group by 1) lo on lo.project_id = ap.id
where lo.project_id is not null

Pitfalls:

  • A snapshot as of the last load (UTC days); the body takes no dates and the sheet's range moves only the weekly line.
  • Never-contacted customers are left out, so it understates the gap.
  • Active means not archived, project status not Finalized, Canceled, On Hold, Legal Hold or Sales Hold, and created more than 7 days ago; Pending Change Order, Cancellation in Progress and the other ON HOLD statuses count as active. Test accounts left out.

Customers by Days Since Contact

Customer Contact Customer Contact: By Days Since Last Contact bar, stacked by contact method · target none

Also called: By Days Since Last Contact

Definition: Active customers grouped by days since our last outgoing call or text: 0 to 6, 7 to 13, 14 to 30, 31 or more, never.

SQL
select case when lo.project_id is null then 'Never'
    when (now() at time zone 'UTC')::date - lo.last_at::date < 7 then '0 to 6 days' when (now() at time zone 'UTC')::date - lo.last_at::date < 14 then '7 to 13 days'
    when (now() at time zone 'UTC')::date - lo.last_at::date <= 30 then '14 to 30 days' else '31 days or more' end as category,
  count(*) as value
from (select p.id, p.date_created
  from phoenix.project p
  join phoenix.object_status os on os.id = p.object_status_id
  join phoenix.base_status b on b.id = os.base_status_id
  where p.company_id = 1 and not p.archived
    and b.base_status not in ('COMPLETE', 'CANCELED')  -- not Finalized or Canceled
    and os.object_status not in ('On Hold', 'Legal Hold', 'Sales Hold')  -- other holds stay active
    and p.date_created < now() - interval '7 days'  -- created more than 7 days ago
    and not exists (select 1 from data_map_1.dm_project_data tap
    where tap.project_id = p.id and cast(tap.osc_4076 as integer) = 1)  -- not a test account
  ) ap
left join (select c.project_id, max(c.date_created) as last_at
    from phoenix.communication c
    where c.direction = 'outgoing' and c.project_id is not null  -- our CloudTalk calls and texts
    group by 1) lo on lo.project_id = ap.id
group by 1
order by 1

Pitfalls:

  • A snapshot as of the last load (UTC days); the body takes no dates and the sheet's range moves only the weekly line.
  • The bar stacks by the last contact's method (Call or Text).
  • Active means not archived, project status not Finalized, Canceled, On Hold, Legal Hold or Sales Hold, and created more than 7 days ago; Pending Change Order, Cancellation in Progress and the other ON HOLD statuses count as active. Test accounts left out.

Contacted Within the Week

Customer Contact Customer Contact: Contacted Within the Week line · target none

Also called: Contacted Within the Week

Definition: For each Monday-to-Sunday week starting in the range, the share of customers active at the week's start that we called or texted that week.

SQL
select count(o.project_id)::numeric / nullif(count(*), 0) as value,
  count(o.project_id) as num, count(*) as den
from (select wk.week_start, c.id as project_id,
    coalesce(c.tos[(select count(*) from unnest(c.ats) t where t <= wk.week_start::timestamp)::int],  -- the last change by the week's start
      c.first_from, c.object_status_id) as status_id  -- else the status before the first later change, else today's
  from (select generate_series(date_trunc('week', (:start_date::date + 6)::timestamp), :end_date::date, interval '1 week')::date as week_start) wk  -- Mondays in the range
  join (select p.id, p.object_status_id, p.date_created, ch.ats, ch.tos, ch.first_from
      from phoenix.project p
      join phoenix.object_status os on os.id = p.object_status_id
      join phoenix.base_status b on b.id = os.base_status_id
      left join (select h.project_id, array_agg(h.changed_at order by h.changed_at) as ats,
          array_agg(h.to_status_id order by h.changed_at) as tos,
          (array_agg(h.from_status_id order by h.changed_at))[1] as first_from
        from phoenix.project_status_history h
        where h.changed_at >= date_trunc('week', (:start_date::date + 6)::timestamp)
        group by 1) ch on ch.project_id = p.id  -- status changes since the first week
      where p.company_id = 1 and not p.archived
        and not exists (select 1 from data_map_1.dm_project_data tap
    where tap.project_id = p.id and cast(tap.osc_4076 as integer) = 1)  -- not a test account
        and (b.base_status not in ('COMPLETE', 'CANCELED') or ch.project_id is not null)) c
    on c.date_created < wk.week_start::timestamp - interval '7 days') s
join phoenix.object_status os on os.id = s.status_id
join phoenix.base_status b on b.id = os.base_status_id
left join (select distinct c.project_id, date_trunc('week', c.date_created)::date as week_start
    from phoenix.communication c
    where c.direction = 'outgoing' and c.date_created >= :start_date::date - 7) o
  on o.project_id = s.project_id and o.week_start = s.week_start  -- an outgoing contact that week
where b.base_status not in ('COMPLETE', 'CANCELED')
  and os.object_status not in ('On Hold', 'Legal Hold', 'Sales Hold')  -- active at the week's start

Pitfalls:

  • A week counts when its Monday is in the range; over several weeks it pools the counts (sum contacted over sum active), so a range reads the project-weeks, not an average of weekly rates.
  • Status at the week's start is rebuilt from project status history, which starts mid-February 2026; Lumen stores only the last 12 whole weeks.
  • Any outgoing call or text that week counts, so it runs above Contacted in Last 7 Days' share of today's customers (October 2026: 41.8%).
  • Of the sheet's filters only Project Type narrows it.
  • Only an outgoing CloudTalk call or text logged on the project counts: emails, calls outside CloudTalk and calls not linked to a project (about 39% of October 2026's outgoing calls had no project) never reset the clock, and nor does the customer calling us.