(+351) 21 24 10006  ·  info@bconcepts.pt
Carnaxide, Lisbon
Anomalies in Time Series with AI in Fabric
Inteligência Artificial

Anomalies in Time Series with AI in Fabric

João Barros 03/11/2026 9 min

Detecting an anomaly early is reducing days of investigation to minutes — provided the pipeline, the model and the visualization communicate with each other.

Why anomaly detection in time series matters in Microsoft Fabric

In many organizations, critical signals arrive as time series: machine telemetry, transaction volumes per minute, API latencies or energy consumption. Detecting anomalous deviations allows responding to incidents, preventing financial losses and optimizing operations. In the context of Microsoft Fabric, integrating that detection into the data flow — from ingestion to Power BI — makes the response actionable and measurable.

Anomalies in Time Series with AI in Fabric

Unlike ad hoc analyses, an operational anomaly detection system must meet three practical requirements: be scalable to millions of points per day, be explainable to non-technical users and be integrated with alerts and dashboards. Fabric provides building blocks — OneLake, Spark Notebooks, Pipelines and the model engine — that, when used correctly, allow meeting these requirements with controlled costs.

Consider the consequences: a factory with 2,000 sensors at 1Hz generates ~173 million readings per day. Without an efficient pipeline, ingestion and preprocessing consume unnecessary time and costs. With OneLake for efficient parquet storage and orchestrated Spark jobs, you can process these readings in windows (for example, aggregations per 1 minute) reducing the volume to manageable levels (≈1.44 million aggregated points per day) while maintaining the ability to respond in a timely manner.

Approaches: statistical, classical ML and deep learning models

The choice of approach depends on the problem. Statistical methods (ARIMA, Holt-Winters, seasonal decomposition) are fast, interpretable and often sufficient for clear seasonality. In scenarios with well-defined daily and weekly patterns, a well-tuned Holt-Winters model can detect 80–90% of relevant anomalies with minimal latency and negligible cost.

Machine learning models such as Isolation Forest, Random Forest on window features, or autoencoders bring robustness when there are complex patterns or multiple variables. Isolation Forest is often used as a baseline: it is simple to train, scalable and usually delivers good results with derived feature sets (rolling mean, standard deviation, z-score, spike indicators). In telemetry contexts, an Isolation Forest trained on 1 million points can infer on the order of seconds per micro-batch when optimized.

Deep learning models (LSTM, Transformers) can capture long dependencies, but require more data and engineering effort. In Fabric, the practical trade-off is: start with statistical models or simple ML on Spark and only scale to deep learning when there is a measurable gain — for example, a reduction in false positives above 20% that justifies the additional cost. A typical example: migrating from an Isolation Forest to a multivariate LSTM can reduce false positives from 60% to 40% on series with nonlinear patterns, but computational and engineering cost can increase 3–5x.

Practical architecture in Microsoft Fabric: from OneLake to the model

A typical operational architecture in Fabric goes through layers: ingestion and landing in OneLake, cleaning and enrichment with Spark Notebooks (over the Lakehouse), training and validation of models with shared compute, and exposing predictions to Power BI or to an event topic for alerts. Use Fabric Pipelines to orchestrate and parameterize daily or windowed runs.

Operational detail: continuous ingestion can write parquet files hourly to OneLake. Spark jobs perform window aggregations (1min, 5min, 1h), create features (rolling mean, z-score, seasonal decomposition) and store processed tables in the Lakehouse. The training step uses rolling samples (e.g., last 12 weeks) and stores model artifacts in Fabric’s model repository. For production inference, we prefer near-real-time batch with micro-batches of 5 to 15 minutes to balance latency and cost.

In a concrete implementation, ingestion can support peaks of 10,000 events per second. Hourly parquet files facilitate efficient column-oriented reads and reduce I/O. Preprocessing jobs can run on Spark clusters with 4–8 nodes for 20–60 minutes per micro-batch, depending on feature complexity. To reduce costs, heavy features (for example, time series transformations with long windows) can be precomputed in a nightly backfill layer, leaving only delta calculations for micro-batches.

Metrics and validation: how to evaluate anomaly models with numbers

Classic evaluators (precision, recall, F1) are essential when ground truth exists. However, in many situations there is no exhaustive labeling. Pragmatic strategies include: 1) labeling human samples to validate the percentage of false positives; 2) using proxy metrics, such as reduction in mean time to resolution (MTTR) after an alert; and 3) measuring economic impact (e.g., value of transactions protected).

Practical metrics example: in a telemetry pipeline, we defined a set of 1,200 suspicious events manually annotated. Model A had precision 0.65 and recall 0.78; model B (more complex) had precision 0.82 and recall 0.70. With investigation costs estimated at €150 per false positive and average loss cost per undetected incident of €2,000, the decision proved financial: the expected cost per 100 alerts from Model A was about €5,200 (assuming 35 false positives and 22 weighted false negatives), while Model B reduced that cost to €3,900. These calculations guide thresholds and model selection.

When there are no labels, alternative measures include: monitoring the percentage of alerts that generate actions (ticket opened, manual intervention) and the evolution of MTTR. In a project we accompanied, the implementation of detection reduced MTTR by 60% (from 12h to 4.8h), with a consequent estimated financial impact reduction of 30% in a quarter.

Integration with Power BI: visualization, explainability and alerts

Detecting is only half the job — the anomaly must be made understandable and actionable. In Power BI, build reports that show the time series with confidence bands, highlighted points and simplified explainability (e.g., evolution of features that contributed most to the score). Embedding direct links to tickets or response playbooks reduces activation time.

For alerts, avoid relying solely on native metric notifications. Produce an events table in the Lakehouse with the anomaly score, context and priority; Power BI can build an operational dashboard, while an additional pipeline publishes critical events to an endpoint (Webhook, Azure Function) for automation. This way, you can distinguish between an operational spike that needs review and an incident that requires immediate intervention.

A useful practice is to add an explainability layer with SHAP or simple importances: for each alert, present the three features that contributed most to the score and a clear text line for users — for example, "Sudden increase in requests per second (+230%) and rise in average latency of service X (+120ms)". In a pilot, including this explainability reduced triage time by the operations team by 35%.

Mini practical case: e-commerce company — numbers and results

In an e-commerce company with 80 employees and 500,000 monthly transactions, the data team implemented an anomaly detection system for volumes per SKU and checkout latencies. Before the project, the support team was alerted manually by customers and spent 120 hours/month investigating reported spikes.

We implemented a pipeline in Fabric: hourly ingestion for transaction data, window aggregation, weekly training of an Isolation Forest with seasonality features and stored results in the Lakehouse. Pilot metrics (3 months) showed: reduction of false positives by 70% (from 150 to 45 alerts/month), decrease in investigation time from 120 to 48 hours/month (approximate saving of 72 hours), and early identification of 3 incidents that would have caused an average loss of €25,000 each — avoiding, in total, estimated losses of €75,000.

Additionally, optimizing the inference interval to 10-minute micro-batches reduced compute costs by 40% compared to a per-minute inference approach, while maintaining acceptable latency for the operations team. The monthly inference cluster cost fell from about €2,400 to €1,440, while the operational gain translated into saved hours and avoided losses justified the initial investment in under two months.

An detection system is only useful if the organization understands the signal, trusts it and has a clear plan to act.

Best practices for production: thresholds, explainability and drift

Thresholds should be data-driven: define multiple levels (informational, review and critical) based on cost/benefit. For explainability, calculate feature contributions for each anomaly (SHAP, permutation importance or simpler correlation techniques) and present them in the Power BI report in operational language — for example, "the latency increase is associated with increased load on server X".

Drift management is vital. Implement continuous monitoring of feature distributions (KS-test, PSI) and historical performance metrics. In Fabric, automate drift alerts and conditional re-training pipelines — for example, retrain if PSI exceeds 0.25 and if performance (F1) drops 10% vs baseline. Also document a rollback plan for models with detected regression.

Additionally, use robust temporal validation (walk-forward) and maintain a holdout validation window. A practical policy: keep 12 weeks of rolling training, 2 weeks of validation and 1 week of test for production. This way you can identify drift arising from seasonal changes or platform modifications without reacting to transient noise.

Operationalization and costs: sizing and practical optimizations

Balancing latency and cost is a recurring theme. Practical strategies: 1) group inferences into micro-batches (5–15 minutes) and reduce the number of features computed online; 2) precompute heavy features in nightly jobs and use only delta updates in real time; 3) leverage caching and columnar formats (parquet) in OneLake for efficient reads.

In Fabric, prefer compute clusters with autoscaling configured and automatic shutdown when idle. Use sampling for initial training and only move to full training when validation proves a gain. Document cost per run and per hour of the cluster to justify trade-offs: for example, a dedicated training cluster can cost €3–6/h but reduces training time from 6h to 1h, accelerating data scientists’ iteration and reducing human cost.

Another practical example: if daily feature processing costs €120 in compute hours, but reducing that cost to €36 with micro-batches and precomputation, the breakeven point to justify the change will be reached in a few weeks if the system prevents a high-criticality incident or reduces repetitive operational hours.

In summary

  • Integrate anomaly detection into the Fabric data flow: OneLake → Spark → models → Power BI for rapid action.
  • Start with simple methods and economic metrics (precision vs investigation cost) before scaling to complex models.
  • Automate drift monitoring, thresholds and retraining to maintain production performance.
  • Optimize costs with micro-batches, feature precomputation and compute autoscaling.
  • Make the model measurable: link alerts to operational metrics (MTTR, loss reduction) and to explanatory dashboards.

Conclusion and next steps

Anomaly detection in time series is an area where the conjunction of data, models and visualization brings quick return when done with discipline. In Microsoft Fabric, the advantage is the native integration between storage, compute and reporting — which makes it easier to turn a signal into action. The practical path is iterative: prototype with simple methods, measure economic impact, adjust thresholds and only then scale model complexity.

Recommended next steps: map the critical series in your organization, define costs per false positive/negative, build a prototype in Fabric with 2–4 key features and validate with an annotated sample. Then, automate pipelines and integrate the results into dashboards with explainability. Would you like to discuss a concrete case in your organization or validate a prototype in Microsoft Fabric?

← Back to insights
Let's talk?

Ready to transform your data?

Book a free 30-minute meeting and find out how we can help your team make better decisions.

Book a Free Meeting
bConcepts