-- Wellfield · Power BI DAX -- Paste this entire script into Power BI Desktop → DAX query view → Run. -- Then click "Update model with changes" to save the measures into the model. -- -- BEFORE YOU RUN -- 1. Get Data → Excel → Wellfield workbook. Select every sheet except "Power BI guide". -- 2. Modeling → Mark as date table → calendar[Date]. -- 3. Relationships (all single-direction, 1:* from the 1 side): -- well information[well name] → liquid levels[well name] -- well information[well name] → pump data[well name] -- well information[well name] → pump installed[well name] -- well information[well name] → temp liquids[well name] -- well information[well name] → well readings[well name] -- well information[well name] → gas quality[well name] -- calendar[Date] → liquid levels[date] -- calendar[Date] → pump data[date] -- calendar[Date] → temp liquids[date] -- calendar[Date] → well readings[date] -- calendar[Date] → gas quality[date] -- SEM data is a fact with no well-name key. Leave it unrelated (or relate -- via a bridge if you add one). Nearby-SEM uses lat/long in the measure. -- 4. Confirm Yes/No columns imported as text ("Yes"/"No"). If they came in as -- TRUE/FALSE the Has Pump measures still work — both are tested. -- 5. Displacement is 0.45 gal/cycle (typical AP4+). Change _GalPerCycle below. -- 6. Excel formula columns (available perf, submerged %, etc.) often import as Text -- because empty rows stored "". This script VALUE()-coerces them. Optional: -- Power Query → select those columns → Data type → Decimal Number. DEFINE VAR _GalPerCycle = 0.45 VAR _HotWellF = 140 VAR _WetScreenPct = 50 VAR _StarvedPerfFt = 5 VAR _SemNearFt = 180 VAR _FtPerDegLat = 364000 VAR _FtPerDegLng = 298200 // ── Calculated columns (saved to the model on Update) ────────────────── // n* columns coerce Text/blank/"" from Excel into numbers. COLUMN 'liquid levels'[n DTF] = IFERROR ( VALUE ( 'liquid levels'[depth to fluid] ), BLANK () ) COLUMN 'liquid levels'[n DTB] = IFERROR ( VALUE ( 'liquid levels'[depth to bottom] ), BLANK () ) COLUMN 'liquid levels'[n TOC] = IFERROR ( VALUE ( 'liquid levels'[elevation of the top of pipe] ), BLANK () ) COLUMN 'liquid levels'[n length perf] = IFERROR ( VALUE ( 'liquid levels'[length perforated] ), BLANK () ) COLUMN 'liquid levels'[n available perf] = IFERROR ( VALUE ( 'liquid levels'[perf not submerged feet] ), BLANK () ) COLUMN 'liquid levels'[n submerged pct] = IFERROR ( VALUE ( 'liquid levels'[submerged percentage] ), BLANK () ) COLUMN 'liquid levels'[n screen blocked pct] = IFERROR ( VALUE ( 'liquid levels'[screen blocked by sediment or obstruction percentage] ), BLANK () ) COLUMN 'liquid levels'[n sediment] = IFERROR ( VALUE ( 'liquid levels'[depth of sediment or obstruction in feet] ), BLANK () ) COLUMN 'liquid levels'[n solid pipe] = IFERROR ( VALUE ( 'liquid levels'[solid pipe without liquids] ), BLANK () ) COLUMN 'liquid levels'[Liquid Elevation] = 'liquid levels'[n TOC] - 'liquid levels'[n DTF] COLUMN 'liquid levels'[Available Perf %] = DIVIDE ( 'liquid levels'[n available perf], 'liquid levels'[n length perf] ) COLUMN 'SEM data'[Exceedance Date] = IFERROR ( DATEVALUE ( 'SEM data'[initial exceedance date and time] ), BLANK () ) COLUMN 'well readings'[n CH4] = IFERROR ( VALUE ( 'well readings'[CH4] ), BLANK () ) COLUMN 'well readings'[n CO2] = IFERROR ( VALUE ( 'well readings'[CO2] ), BLANK () ) COLUMN 'well readings'[n O2] = IFERROR ( VALUE ( 'well readings'[O2] ), BLANK () ) COLUMN 'well readings'[n balance] = IFERROR ( VALUE ( 'well readings'[balance] ), BLANK () ) COLUMN 'well readings'[n adj temp] = IFERROR ( VALUE ( 'well readings'[adjusted temp] ), BLANK () ) COLUMN 'well readings'[n adj static] = IFERROR ( VALUE ( 'well readings'[adjusted static] ), BLANK () ) COLUMN 'well readings'[n adj diff] = IFERROR ( VALUE ( 'well readings'[adjusted differential] ), BLANK () ) COLUMN 'well readings'[n adj available] = IFERROR ( VALUE ( 'well readings'[adjusted available] ), BLANK () ) COLUMN 'well readings'[n adj flow] = IFERROR ( VALUE ( 'well readings'[adjusted flow] ), BLANK () ) COLUMN 'well readings'[n system pressure] = IFERROR ( VALUE ( 'well readings'[system pressure] ), BLANK () ) COLUMN 'well readings'[n H2S] = IFERROR ( VALUE ( 'well readings'[H2S] ), BLANK () ) COLUMN 'well readings'[n MMBTU] = IFERROR ( VALUE ( 'well readings'[MMBTU] ), BLANK () ) COLUMN 'well readings'[n open screen] = IFERROR ( VALUE ( 'well readings'[percent open screen] ), BLANK () ) COLUMN 'pump data'[n cycles per day] = IFERROR ( VALUE ( 'pump data'[cycles per day] ), BLANK () ) COLUMN 'pump data'[n cycle increase] = IFERROR ( VALUE ( 'pump data'[cycle counter increase] ), BLANK () ) COLUMN 'temp liquids'[n temp F] = IFERROR ( VALUE ( 'temp liquids'[temperature in Fahrenheit] ), BLANK () ) COLUMN 'SEM data'[n initial value] = IFERROR ( VALUE ( 'SEM data'[initial value] ), BLANK () ) COLUMN 'gas quality'[n CH4] = IFERROR ( VALUE ( 'gas quality'[methane percent] ), BLANK () ) COLUMN 'gas quality'[n CO2] = IFERROR ( VALUE ( 'gas quality'[carbon dioxide percent] ), BLANK () ) COLUMN 'gas quality'[n O2] = IFERROR ( VALUE ( 'gas quality'[oxygen percent] ), BLANK () ) COLUMN 'gas quality'[n balance] = IFERROR ( VALUE ( 'gas quality'[balance percent] ), BLANK () ) COLUMN 'gas quality'[n vacuum] = IFERROR ( VALUE ( 'gas quality'[applied vacuum inches wc] ), BLANK () ) COLUMN 'gas quality'[n flow] = IFERROR ( VALUE ( 'gas quality'[flow scfm] ), BLANK () ) // ── Core liquid / screen measures ────────────────────────────────────── MEASURE 'liquid levels'[Soundings] = COUNTROWS ( 'liquid levels' ) MEASURE 'liquid levels'[Available Perf (ft)] = AVERAGE ( 'liquid levels'[n available perf] ) MEASURE 'liquid levels'[Available Perf %] = AVERAGE ( 'liquid levels'[Available Perf %] ) MEASURE 'liquid levels'[Submerged %] = AVERAGE ( 'liquid levels'[n submerged pct] ) MEASURE 'liquid levels'[Screen Blocked %] = AVERAGE ( 'liquid levels'[n screen blocked pct] ) MEASURE 'liquid levels'[Sediment (ft)] = AVERAGE ( 'liquid levels'[n sediment] ) MEASURE 'liquid levels'[Liquid Elevation] = AVERAGE ( 'liquid levels'[Liquid Elevation] ) MEASURE 'liquid levels'[Depth to Fluid] = AVERAGE ( 'liquid levels'[n DTF] ) MEASURE 'liquid levels'[Depth to Bottom] = AVERAGE ( 'liquid levels'[n DTB] ) MEASURE 'liquid levels'[Dry Solid (ft)] = AVERAGE ( 'liquid levels'[n solid pipe] ) MEASURE 'liquid levels'[Latest Sounding Date] = MAX ( 'liquid levels'[date] ) MEASURE 'liquid levels'[Latest Available Perf (ft)] = LASTNONBLANKVALUE ( 'liquid levels'[date], AVERAGE ( 'liquid levels'[n available perf] ) ) MEASURE 'liquid levels'[Latest Submerged %] = LASTNONBLANKVALUE ( 'liquid levels'[date], AVERAGE ( 'liquid levels'[n submerged pct] ) ) MEASURE 'liquid levels'[Latest Screen Blocked %] = LASTNONBLANKVALUE ( 'liquid levels'[date], AVERAGE ( 'liquid levels'[n screen blocked pct] ) ) MEASURE 'liquid levels'[Latest Liquid Elevation] = LASTNONBLANKVALUE ( 'liquid levels'[date], AVERAGE ( 'liquid levels'[Liquid Elevation] ) ) MEASURE 'liquid levels'[Latest Depth to Fluid] = LASTNONBLANKVALUE ( 'liquid levels'[date], AVERAGE ( 'liquid levels'[n DTF] ) ) MEASURE 'liquid levels'[Days Since Sounding] = VAR LastSound = [Latest Sounding Date] VAR AsOf = COALESCE ( MAX ( calendar[Date] ), TODAY () ) RETURN IF ( NOT ISBLANK ( LastSound ), INT ( AsOf - LastSound ) ) MEASURE 'liquid levels'[Liquid Rise 4 Readings (ft)] = VAR Last4 = TOPN ( 4, SUMMARIZE ( 'liquid levels', 'liquid levels'[date], 'liquid levels'[n DTF] ), 'liquid levels'[date], DESC ) VAR LastDTF = MAXX ( TOPN ( 1, Last4, 'liquid levels'[date], DESC ), 'liquid levels'[n DTF] ) VAR OldestDTF = MAXX ( TOPN ( 1, Last4, 'liquid levels'[date], ASC ), 'liquid levels'[n DTF] ) RETURN IF ( COUNTROWS ( Last4 ) >= 4, OldestDTF - LastDTF ) MEASURE 'liquid levels'[Wet Wells] = CALCULATE ( DISTINCTCOUNT ( 'liquid levels'[well name] ), FILTER ( VALUES ( 'well information'[well name] ), [Latest Submerged %] >= _WetScreenPct ) ) MEASURE 'liquid levels'[Starved Wells] = CALCULATE ( DISTINCTCOUNT ( 'liquid levels'[well name] ), FILTER ( VALUES ( 'well information'[well name] ), [Latest Available Perf (ft)] < _StarvedPerfFt ) ) // ── Dewatering / pumps ───────────────────────────────────────────────── MEASURE 'pump data'[Cycles / Day] = AVERAGE ( 'pump data'[n cycles per day] ) MEASURE 'pump data'[Latest Cycles / Day] = LASTNONBLANKVALUE ( 'pump data'[date], AVERAGE ( 'pump data'[n cycles per day] ) ) MEASURE 'pump data'[Cycle Increase] = SUM ( 'pump data'[n cycle increase] ) MEASURE 'pump data'[Gallons Pumped] = [Cycle Increase] * _GalPerCycle MEASURE 'pump data'[Gallons Pumped 30d] = CALCULATE ( [Gallons Pumped], DATESINPERIOD ( calendar[Date], COALESCE ( MAX ( calendar[Date] ), TODAY () ), -30, DAY ) ) MEASURE 'pump installed'[Pumps in Service] = CALCULATE ( COUNTROWS ( 'pump installed' ), 'pump installed'[has pump] IN { "Yes", "YES", TRUE (), 1 } ) MEASURE 'pump installed'[Pumps Not Cycling] = CALCULATE ( COUNTROWS ( VALUES ( 'well information'[well name] ) ), FILTER ( VALUES ( 'well information'[well name] ), VAR HasPump = CALCULATE ( MAX ( 'pump installed'[has pump] ) ) IN { "Yes", "YES", TRUE (), 1 } VAR Cpd = [Latest Cycles / Day] VAR Sub = [Latest Submerged %] RETURN HasPump && Cpd < 1 && Sub > 40 ) ) MEASURE 'pump installed'[Air Only Wells] = CALCULATE ( COUNTROWS ( 'pump installed' ), 'pump installed'[has only air] IN { "Yes", "YES", TRUE (), 1 } ) MEASURE 'pump installed'[Wet No Pump] = CALCULATE ( COUNTROWS ( VALUES ( 'well information'[well name] ) ), FILTER ( VALUES ( 'well information'[well name] ), VAR HasPump = CALCULATE ( MAX ( 'pump installed'[has pump] ) ) IN { "Yes", "YES", TRUE (), 1 } RETURN NOT HasPump && [Latest Submerged %] > 55 ) ) // ── Well readings (field tune — preferred over gas quality) ──────────── MEASURE 'well readings'[Readings] = COUNTROWS ( 'well readings' ) MEASURE 'well readings'[Tune CH4 %] = AVERAGE ( 'well readings'[n CH4] ) MEASURE 'well readings'[Tune CO2 %] = AVERAGE ( 'well readings'[n CO2] ) MEASURE 'well readings'[Tune O2 %] = AVERAGE ( 'well readings'[n O2] ) MEASURE 'well readings'[Tune Balance %] = AVERAGE ( 'well readings'[n balance] ) MEASURE 'well readings'[Adjusted Temp F] = AVERAGE ( 'well readings'[n adj temp] ) MEASURE 'well readings'[Adjusted Static] = AVERAGE ( 'well readings'[n adj static] ) MEASURE 'well readings'[Adjusted Differential] = AVERAGE ( 'well readings'[n adj diff] ) MEASURE 'well readings'[Adjusted Available] = AVERAGE ( 'well readings'[n adj available] ) MEASURE 'well readings'[Adjusted Flow (scfm)] = AVERAGE ( 'well readings'[n adj flow] ) MEASURE 'well readings'[System Pressure] = AVERAGE ( 'well readings'[n system pressure] ) MEASURE 'well readings'[H2S ppm] = AVERAGE ( 'well readings'[n H2S] ) MEASURE 'well readings'[MMBTU] = SUM ( 'well readings'[n MMBTU] ) MEASURE 'well readings'[Open Screen %] = AVERAGE ( 'well readings'[n open screen] ) MEASURE 'well readings'[Latest Flow] = LASTNONBLANKVALUE ( 'well readings'[date], AVERAGE ( 'well readings'[n adj flow] ) ) MEASURE 'well readings'[Latest H2S] = LASTNONBLANKVALUE ( 'well readings'[date], AVERAGE ( 'well readings'[n H2S] ) ) MEASURE 'well readings'[Latest Available Vacuum] = LASTNONBLANKVALUE ( 'well readings'[date], AVERAGE ( 'well readings'[n adj available] ) ) // ── Gas quality (legacy slim tab — well readings win when both exist) ── MEASURE 'gas quality'[CH4 %] = AVERAGE ( 'gas quality'[n CH4] ) MEASURE 'gas quality'[CO2 %] = AVERAGE ( 'gas quality'[n CO2] ) MEASURE 'gas quality'[O2 %] = AVERAGE ( 'gas quality'[n O2] ) MEASURE 'gas quality'[Balance %] = AVERAGE ( 'gas quality'[n balance] ) MEASURE 'gas quality'[Vacuum (in wc)] = AVERAGE ( 'gas quality'[n vacuum] ) MEASURE 'gas quality'[Flow (scfm)] = AVERAGE ( 'gas quality'[n flow] ) MEASURE 'gas quality'[Latest CH4 %] = VAR FromTune = LASTNONBLANKVALUE ( 'well readings'[date], AVERAGE ( 'well readings'[n CH4] ) ) RETURN IF ( NOT ISBLANK ( FromTune ), FromTune, LASTNONBLANKVALUE ( 'gas quality'[date], AVERAGE ( 'gas quality'[n CH4] ) ) ) MEASURE 'gas quality'[Latest O2 %] = VAR FromTune = LASTNONBLANKVALUE ( 'well readings'[date], AVERAGE ( 'well readings'[n O2] ) ) RETURN IF ( NOT ISBLANK ( FromTune ), FromTune, LASTNONBLANKVALUE ( 'gas quality'[date], AVERAGE ( 'gas quality'[n O2] ) ) ) MEASURE 'gas quality'[Latest Vacuum] = VAR FromTune = LASTNONBLANKVALUE ( 'well readings'[date], ABS ( AVERAGE ( 'well readings'[n adj available] ) ) ) RETURN IF ( NOT ISBLANK ( FromTune ), FromTune, LASTNONBLANKVALUE ( 'gas quality'[date], AVERAGE ( 'gas quality'[n vacuum] ) ) ) MEASURE 'gas quality'[High O2 Wells] = CALCULATE ( DISTINCTCOUNT ( 'gas quality'[well name] ), FILTER ( VALUES ( 'well information'[well name] ), [Latest O2 %] >= 2.5 ) ) // ── Temperature ──────────────────────────────────────────────────────── MEASURE 'temp liquids'[Max Temperature F] = MAX ( 'temp liquids'[n temp F] ) MEASURE 'temp liquids'[Hot Wells] = CALCULATE ( DISTINCTCOUNT ( 'temp liquids'[well name] ), 'temp liquids'[n temp F] >= _HotWellF ) // ── SEM ──────────────────────────────────────────────────────────────── MEASURE 'SEM data'[SEM Events] = COUNTROWS ( 'SEM data' ) MEASURE 'SEM data'[SEM 90d] = CALCULATE ( [SEM Events], DATESINPERIOD ( calendar[Date], COALESCE ( MAX ( calendar[Date] ), TODAY () ), -90, DAY ) ) MEASURE 'SEM data'[Mean Initial ppm] = AVERAGE ( 'SEM data'[n initial value] ) MEASURE 'SEM data'[Nearby SEM (180 ft)] = // Row / filter context must be a single well (table visual by well name). VAR WellLat = SELECTEDVALUE ( 'well information'[latitude] ) VAR WellLng = SELECTEDVALUE ( 'well information'[longitude] ) VAR AsOf = COALESCE ( MAX ( calendar[Date] ), TODAY () ) VAR Cutoff = AsOf - 180 RETURN IF ( NOT ISBLANK ( WellLat ), COUNTROWS ( FILTER ( 'SEM data', VAR Dx = ( 'SEM data'[longitude] - WellLng ) * _FtPerDegLng VAR Dy = ( 'SEM data'[latitude] - WellLat ) * _FtPerDegLat VAR Dist = SQRT ( Dx * Dx + Dy * Dy ) VAR EvtDate = DATEVALUE ( 'SEM data'[initial exceedance date and time] ) RETURN Dist < _SemNearFt && EvtDate >= Cutoff ) ) ) // ── Health + collection gap (same weights as Wellfield) ──────────────── MEASURE 'well information'[Well Count] = COUNTROWS ( 'well information' ) MEASURE 'well information'[Health Score] = VAR LenPerf = IFERROR ( VALUE ( SELECTEDVALUE ( 'well information'[length perforated] ) ), BLANK () ) VAR AvailPct = COALESCE ( DIVIDE ( [Latest Available Perf (ft)], LenPerf ) * 100, 40 ) VAR Blocked = COALESCE ( [Latest Screen Blocked %], 0 ) VAR Days = [Days Since Sounding] VAR Recency = IF ( ISBLANK ( Days ), 0.3, MIN ( 1, MAX ( 0, 1 - Days / 90 ) ) ) VAR HasPump = CALCULATE ( MAX ( 'pump installed'[has pump] ) ) IN { "Yes", "YES", TRUE (), 1 } VAR PumpScore = IF ( NOT HasPump, IF ( [Latest Submerged %] > 60, 0.15, 0.70 ), IF ( [Latest Cycles / Day] < 1 && [Latest Submerged %] > 40, 0.10, 0.90 ) ) VAR Ch4 = [Latest CH4 %] VAR O2 = [Latest O2 %] VAR GasScore = IF ( ISBLANK ( Ch4 ), 0.5, MIN ( 1, Ch4 / 55 ) * IF ( O2 > 2, 0.5, 1 ) ) VAR Raw = AvailPct * 0.40 + ( 100 - Blocked ) * 0.20 + Recency * 100 * 0.15 + PumpScore * 100 * 0.15 + GasScore * 100 * 0.10 RETURN ROUND ( MIN ( 100, MAX ( 0, Raw ) ), 0 ) MEASURE 'well information'[Mean Health] = AVERAGEX ( VALUES ( 'well information'[well name] ), [Health Score] ) MEASURE 'well information'[Collection Deficit] = // Simplified vs the map (no neighbor IDW). Uses this well's cover, // nearby SEM, vacuum, and submerged screen. VAR AvailPct = DIVIDE ( [Latest Available Perf (ft)], IFERROR ( VALUE ( SELECTEDVALUE ( 'well information'[length perforated] ) ), BLANK () ) ) VAR Cover = COALESCE ( AvailPct, 0.3 ) VAR SemN = COALESCE ( [Nearby SEM (180 ft)], 0 ) VAR Vac = [Latest Vacuum] VAR Sub = [Latest Submerged %] VAR Raw = ( 1 - Cover ) * 40 + SemN * 18 + IF ( NOT ISBLANK ( Vac ) && Vac < 8, 20, 0 ) + IF ( Sub > 70, 15, 0 ) RETURN MIN ( 100, MAX ( 0, Raw ) ) MEASURE 'well information'[Gap Wells] = CALCULATE ( COUNTROWS ( VALUES ( 'well information'[well name] ) ), FILTER ( VALUES ( 'well information'[well name] ), [Collection Deficit] >= 55 && SELECTEDVALUE ( 'well information'[well type] ) <> "leachate" ) ) // ── Issue flags (1 = fail) — use in a well table or as KPI cards ─────── MEASURE 'well information'[Flag Starved Perf] = IF ( [Latest Available Perf (ft)] < _StarvedPerfFt, 1, 0 ) MEASURE 'well information'[Flag Screen Blocked] = IF ( [Latest Screen Blocked %] >= 35, 1, 0 ) MEASURE 'well information'[Flag Dead Pump] = VAR HasPump = CALCULATE ( MAX ( 'pump installed'[has pump] ) ) IN { "Yes", "YES", TRUE (), 1 } RETURN IF ( HasPump && [Latest Cycles / Day] < 1 && [Latest Submerged %] > 40, 1, 0 ) MEASURE 'well information'[Flag Wet No Pump] = VAR HasPump = CALCULATE ( MAX ( 'pump installed'[has pump] ) ) IN { "Yes", "YES", TRUE (), 1 } RETURN IF ( NOT HasPump && [Latest Submerged %] > 55, 1, 0 ) MEASURE 'well information'[Flag Hot] = IF ( [Max Temperature F] >= _HotWellF, 1, 0 ) MEASURE 'well information'[Flag Stale Sounding] = IF ( [Days Since Sounding] > 45, 1, 0 ) MEASURE 'well information'[Flag High O2] = IF ( [Latest O2 %] >= 2.5, 1, 0 ) MEASURE 'well information'[Flag SEM Cluster] = IF ( [Nearby SEM (180 ft)] >= 2, 1, 0 ) MEASURE 'well information'[Flag Collection Gap] = IF ( [Collection Deficit] >= 55, 1, 0 ) MEASURE 'well information'[Flag Liquid Rise] = IF ( [Liquid Rise 4 Readings (ft)] >= 6, 1, 0 ) MEASURE 'well information'[Open Flags] = [Flag Starved Perf] + [Flag Screen Blocked] + [Flag Dead Pump] + [Flag Wet No Pump] + [Flag Hot] + [Flag Stale Sounding] + [Flag High O2] + [Flag SEM Cluster] + [Flag Collection Gap] + [Flag Liquid Rise] MEASURE 'well information'[Critical Count] = SUMX ( VALUES ( 'well information'[well name] ), IF ( [Flag Dead Pump] + [Flag Hot] + IF ( [Latest Available Perf (ft)] < 2, 1, 0 ) + IF ( [Latest Screen Blocked %] >= 60, 1, 0 ) + IF ( [Latest O2 %] >= 4, 1, 0 ) + IF ( [Collection Deficit] >= 75, 1, 0 ) > 0, 1, 0 ) ) // ── Queries ──────────────────────────────────────────────────────────────── // Highlight one EVALUATE at a time, or leave the first as the default run. EVALUATE SUMMARIZECOLUMNS ( 'well information'[well name], 'well information'[well type], "Health", [Health Score], "Avail perf ft", [Latest Available Perf (ft)], "Submerged %", [Latest Submerged %], "Blocked %", [Latest Screen Blocked %], "Liq elev", [Latest Liquid Elevation], "cyc/d", [Latest Cycles / Day], "30d gal", [Gallons Pumped 30d], "CH4 %", [Latest CH4 %], "O2 %", [Latest O2 %], "Flow scfm", [Latest Flow], "H2S", [Latest H2S], "Vacuum", [Latest Vacuum], "Max °F", [Max Temperature F], "SEM nearby", [Nearby SEM (180 ft)], "Deficit", [Collection Deficit], "Flags", [Open Flags] ) ORDER BY [Health] ASC // Command-center KPIs (no well grain) — highlight this block to run it: /* EVALUATE ROW ( "Wells", [Well Count], "Mean health", [Mean Health], "Critical wells", [Critical Count], "Wet wells", [Wet Wells], "Starved wells", [Starved Wells], "Pumps in service", [Pumps in Service], "Not cycling", [Pumps Not Cycling], "Air only", [Air Only Wells], "Wet no pump", [Wet No Pump], "Gal 30d", [Gallons Pumped 30d], "Avail perf ft", [Available Perf (ft)], "SEM 90d", [SEM 90d], "CH4 %", [CH4 %], "Gap wells", [Gap Wells], "Hot wells", [Hot Wells] ) */ // Liquid elevation over time — for a line chart query: /* EVALUATE SUMMARIZECOLUMNS ( calendar[YearMonthName], calendar[YearMonth], "Liquid elevation", [Liquid Elevation], "Available perf ft", [Available Perf (ft)], "Submerged %", [Submerged %] ) ORDER BY calendar[YearMonth] */