New: free Power BI model health check. Find what's making your numbers wrong and your model slow. Check your model →
← Back to Blog

Systems & Program Engineering DAX Patterns Cheat Sheet

A fast, scannable reference for the DAX patterns systems and program engineers actually need in Power BI: EVM (CPI/SPI/EAC) and Earned Schedule (SPI(t), forecast finish), risk scoring, FMEA/RPN, requirements coverage, reliability metrics (MTBF/MTTR, Weibull B10), SPC control charts (limits, run rules, Cpk), and Pareto analysis (cumulative %, vital few).

DAXCheat SheetData Modeling

Most DAX content is written around sales data. This is a reference for the calculation shapes that show up constantly in systems and program engineering reporting instead — earned value, risk scoring, failure mode analysis, requirements coverage, reliability metrics, statistical process control, and Pareto analysis. Each section links to a full fast-reference page and a complete tutorial with a real dataset.

Earned Value Management (EVM)

PV (Planned Value) =
SUMX(Tasks, Tasks[BAC] * Tasks[PlannedPercentComplete])

EV (Earned Value) =
SUMX(Tasks, Tasks[BAC] * Tasks[PercentComplete])

AC (Actual Cost) =
SUM(Tasks[ActualCost])

CPI (Cost Performance Index) =
DIVIDE([EV (Earned Value)], [AC (Actual Cost)])

SPI (Schedule Performance Index) =
DIVIDE([EV (Earned Value)], [PV (Planned Value)])

EAC (Estimate at Completion) =
DIVIDE([BAC (Budget at Completion)], [CPI (Cost Performance Index)])
CPI/SPI < 1  -> over budget / behind schedule
CPI/SPI = 1  -> exactly on budget / on schedule
CPI/SPI > 1  -> under budget / ahead of schedule

EV and PV are computed per task, then summed — never as one blended, program-wide percent complete. See Earned Value Management (EVM) Metrics for the full measure set (CV, SV, VAC, TCPI, and the other standard EAC formulas) and Build an EVM Dashboard for a complete walkthrough with a disconnected date table. To run the numbers from a status report without building a model, use the EVM Calculator.

Earned Schedule (schedule in days)

SPI measures schedule in money, so it can't say how many days behind you are, and it drifts back to 1.0 at the end of a late program. Earned Schedule finds the date on the baseline PV curve where planned value equals today's EV:

ES Date =
VAR EarnedValue = [EV (Earned Value)]
VAR Curve =
    ADDCOLUMNS(ALL(DimDate[Date]), "@PV", [PV (Planned Value)])
VAR LastDate =
    MAXX(FILTER(Curve, [@PV] <= EarnedValue), DimDate[Date])
VAR PVAtLast =
    MAXX(FILTER(Curve, DimDate[Date] = LastDate), [@PV])
VAR PVNext =
    MAXX(FILTER(Curve, DimDate[Date] = LastDate + 1), [@PV])
RETURN
    LastDate
        + IF(
            ISBLANK(PVNext),
            0,
            DIVIDE(EarnedValue - PVAtLast, PVNext - PVAtLast, 0)
        )

SPI(t) =
DIVIDE([ES (Days)], [AT (Days)])
ES (Days) = ES Date - project start      AT (Days) = status date - project start
SPI(t)    = ES / AT                       SV(t)     = ES - AT   (days, negative = behind)
Forecast finish = start + planned duration / SPI(t)

This needs a time-phased PV measure (one that reads MAX(DimDate[Date]) from a disconnected date table), which the EVM tutorial already builds. On its data: SPI 0.64, SPI(t) 0.69, 41 days behind, forecast finish November 2 against a July 31 plan. See Earned Schedule for the full measure set, or enter a cumulative PV baseline in the EVM Calculator.

Schedule risk (Monte Carlo)

SPI says how far behind the program is today. It doesn't say how likely a finish date is. For that, simulate the schedule from three-point duration estimates and load one row per simulated run into a Simulations table. Then reuse the disconnected-date trick from PV:

Probability Finished By =
VAR StatusDate = MAX ( FinishCalendar[Date] )
RETURN
    DIVIDE (
        COUNTROWS ( FILTER ( Simulations, Simulations[FinishDate] <= StatusDate ) ),
        COUNTROWS ( Simulations )
    )

P80 Finish =
CONVERT (
    ROUNDUP ( PERCENTILEX.INC ( Simulations, Simulations[FinishDate] * 1, 0.8 ), 0 ),
    DATETIME
)

On a line chart with FinishCalendar[Date] on the axis, Probability Finished By draws the S-curve. The plan you get by adding up most-likely durations usually lands well below 50% on it, because estimates skew late and parallel paths merge. DAX can't walk a task network, but it can add up a list of paths: Build a Monte Carlo Schedule Risk Dashboard runs the whole simulation in calculated tables. For networks too big to list, run it in the Schedule Risk Simulator and download the runs as CSV.

Risk Score & Heat Map

Current Likelihood =
VAR LatestDate = CALCULATE(MAX(FactRiskAssessment[AssessmentDate]))
RETURN
    CALCULATE(
        SELECTEDVALUE(FactRiskAssessment[Likelihood]),
        FactRiskAssessment[AssessmentDate] = LatestDate
    )

Risk Score =
[Current Likelihood] * [Current Impact]

Risk Level =
SWITCH(
    TRUE(),
    [Risk Score] >= 15, "Critical",
    [Risk Score] >= 9, "High",
    [Risk Score] >= 4, "Medium",
    [Risk Score] > 0, "Low",
    BLANK()
)

A risk reassessed over time needs its latest likelihood/impact, never an average across every historical assessment — that would hide whether a risk has gotten better or worse. See Risk Score & Heat Map for the disconnected-axis matrix pattern and Build a Risk Register Dashboard for the full walkthrough. To see a risk list on a heat map without building a model, paste it into the Risk Matrix Builder.

FMEA & RPN Scoring

Current RPN =
[Current Severity] * [Current Occurrence] * [Current Detection]

Action Priority =
SWITCH(
    TRUE(),
    [Current Severity] >= 9, "High",
    [Current RPN] >= 100, "High",
    [Current RPN] >= 50, "Medium",
    [Current RPN] > 0, "Low",
    BLANK()
)

RPN Reduction % =
DIVIDE([Initial RPN] - [Current RPN], [Initial RPN])

RPN is a product of three ratings, which can bury a genuinely dangerous, low-likelihood failure mode under a deceptively low score — the Severity >= 9 check has to run before the RPN thresholds, not after. See FMEA & RPN Scoring for the full before/after comparison and Build an FMEA Dashboard for a complete walkthrough. To score a list of failure modes without building a model, paste it into the FMEA Calculator.

Coverage & Verification (Requirements Traceability)

Requirements Covered =
DISTINCTCOUNT(BridgeRequirementTest[RequirementID])

Coverage % =
DIVIDE([Requirements Covered], [Total Requirements])

Requirements Verified =
VAR PassingTestCaseIDs =
    CALCULATETABLE(
        VALUES(FactTestResults[TestCaseID]),
        FactTestResults[Status] = "Pass"
    )
VAR VerifiedRequirementIDs =
    CALCULATETABLE(
        VALUES(BridgeRequirementTest[RequirementID]),
        FILTER(
            BridgeRequirementTest,
            BridgeRequirementTest[TestCaseID] IN PassingTestCaseIDs
        )
    )
RETURN
    COUNTROWS(VerifiedRequirementIDs)
Coverage %  -> a test exists for this requirement
Verified %  -> that test actually passed

Verified % is always <= Coverage %

"Covered" and "verified" are always two different numbers — reporting coverage alone overstates progress. See Coverage & Verification for the full bridge-table pattern and Build a Requirements Traceability Matrix for a complete walkthrough. To check coverage on your own requirements without building a model, paste them into the Traceability Matrix Builder.

Reliability Metrics (MTBF, MTTR & Availability)

MTBF (Hours) =
DIVIDE([Total Uptime Hours], [Total Failures])

MTTR (Hours) =
DIVIDE([Total Repair Hours], [Total Failures])

Availability % =
DIVIDE([MTBF (Hours)], [MTBF (Hours)] + [MTTR (Hours)])

Total Uptime Hours itself needs a calculated column first — the gap between one failure and the previous repair for that same asset, with the asset's commissioning date as a fallback for its first-ever failure. See Reliability Metrics (MTBF, MTTR & Availability) for that calculated column and Build a Reliability Dashboard for a complete walkthrough. To get the numbers from a failure log without building a model, paste it into the Reliability Calculator.

Weibull Life Analysis (β, η, B10)

-- Calculated columns, after sorting by hours and adding an Order index in Power Query
Adjusted Rank =
IF (
    Pumps[Status] = "F",
    VAR N = COUNTROWS ( Pumps )
    VAR CurrentOrder = Pumps[Order]
    VAR StillSurviving =
        PRODUCTX (
            FILTER ( Pumps, Pumps[Status] = "F" && Pumps[Order] <= CurrentOrder ),
            DIVIDE ( N - Pumps[Order] + 1, N - Pumps[Order] + 2 )
        )
    RETURN
        ( N + 1 ) * ( 1 - StillSurviving )
)

Plot Y = IF ( Pumps[Status] = "F", LN ( -LN ( 1 - DIVIDE ( Pumps[Adjusted Rank] - 0.3, COUNTROWS ( Pumps ) + 0.4 ) ) ) )

-- Measures
Weibull Beta =
VAR Fit = LINESTX ( FILTER ( ALL ( Pumps ), Pumps[Status] = "F" ), LN ( Pumps[Hours] ), Pumps[Plot Y] )
RETURN DIVIDE ( 1, MAXX ( Fit, [Slope1] ) )

Weibull Eta =
VAR Fit = LINESTX ( FILTER ( ALL ( Pumps ), Pumps[Status] = "F" ), LN ( Pumps[Hours] ), Pumps[Plot Y] )
RETURN EXP ( MAXX ( Fit, [Intercept] ) )

B10 Life = [Weibull Eta] * POWER ( -LN ( 0.9 ), 1 / [Weibull Beta] )

Running units stay in as suspensions: Johnson's adjusted rank, written as a running product so PRODUCTX can do it, lets them shift every later failure's rank without being plotted. β below 1 means early failures, about 1 random, above 1 wear-out. For wear-out parts, set intervals from the B-life, not MTBF: the Weibull tutorial shows a fleet where an MTBF-based interval let three pumps in four fail first. Or paste hours into the Weibull Analysis tool.

Process Control (SPC Control Charts)

Center Line =
CALCULATE(AVERAGE(Measurements[Value]), REMOVEFILTERS(Measurements), Measurements[SampleNo] <= 20)

Sigma =
CALCULATE(AVERAGE(Measurements[Moving Range]), REMOVEFILTERS(Measurements), Measurements[SampleNo] <= 20) / 1.128

UCL = [Center Line] + 3 * [Sigma]
LCL = [Center Line] - 3 * [Sigma]

Cpk =
MIN(DIVIDE(24.5 - [Center Line], 3 * [Sigma]), DIVIDE([Center Line] - 23.5, 3 * [Sigma]))

Moving Range is a calculated column: the absolute difference from the previous SampleNo. Two choices decide whether the chart works: limits come from a fixed baseline, never all the data, and sigma comes from the average moving range, never STDEV.S, so a shift can't widen the limits and hide itself. The Western Electric rules are one more measure over a window of z-scores. See Build an SPC Control Chart Dashboard for the rules measure and a complete walkthrough, or paste measurements into the Control Chart Builder for I-MR, X̄-R, and p charts without building a model.

Pareto Analysis (Vital Few)

Defect Count = COUNTROWS ( Defects )

Cumulative Count =
VAR CurrentCause = SELECTEDVALUE ( Defects[Cause] )
VAR CurrentValue = [Defect Count]
VAR AtOrAbove =
    FILTER (
        ADDCOLUMNS ( ALLSELECTED ( Defects[Cause] ), "@Value", [Defect Count] ),
        NOT ISBLANK ( [@Value] )
            && ( Defects[Cause] = CurrentCause
                || [@Value] > CurrentValue
                || ( [@Value] = CurrentValue && Defects[Cause] < CurrentCause ) )
    )
RETURN
    IF ( HASONEVALUE ( Defects[Cause] ) && NOT ISBLANK ( CurrentValue ), SUMX ( AtOrAbove, [@Value] ) )

Cumulative % =
DIVIDE ( [Cumulative Count], CALCULATE ( [Defect Count], ALLSELECTED ( Defects[Cause] ) ) )

Vital Few =
VAR Before = [Cumulative Count] - [Defect Count]
VAR AllCauses = CALCULATE ( [Defect Count], ALLSELECTED ( Defects[Cause] ) )
RETURN
    IF ( NOT ISBLANK ( [Cumulative Count] ), IF ( DIVIDE ( Before, AllCauses ) < 0.8, 1, 0 ) )

Each cause's cumulative is everything ranked at or above it, with ties broken by name so the line steps up once per bar. Sort the chart by a rank measure built from the same AtOrAbove table (COUNTROWS instead of SUMX), not by the count, and fix the line's axis at 0–100%. The vital few test the share before each cause, so the cause that crosses 80% is included. Swap [Defect Count] for a cost measure and the order often changes. See Build a Pareto Chart Dashboard for the rank measure, keeping "Other" last, and the count-versus-cost comparison, or paste causes into the Pareto Chart Builder.

Quick Decision Table

NeedPattern
Is the program on budget / on schedule?EVM: CPI, SPI
What will this program actually cost?EVM: EAC
How many days behind is it, and when will it finish at this pace?Earned Schedule: SV(t), Forecast Finish
When will it realistically finish?Schedule risk: P80 Finish, Probability Finished By
Where do risks cluster by severity?Risk Score & Heat Map
Is a low-probability failure mode still dangerous?FMEA: Severity override on RPN
Did a corrective action actually help?FMEA: RPN Reduction %
Has every requirement been tested?Coverage & Verification: Coverage %
Has every requirement's test actually passed?Coverage & Verification: Verified %
How often does an asset fail, and for how long?Reliability: MTBF, MTTR
Do failures come early, at random, or from wear-out? When to replace?Weibull: Weibull Beta, B10 Life
Has the process changed, or is it just noise?SPC: UCL / LCL, Signal Rules
Will the process keep making parts in spec?SPC: Cpk
Which few causes make up most of the defects?Pareto: Cumulative %, Vital Few

Next Steps