4.3.3. Reference Lines, Error Bars, Forecasting, and Anomalies
💡 First Principle: A trend line on its own invites guesses: is this high? Is this unusual? Where will it go? Reference lines anchor values to benchmarks, error bars show uncertainty, forecasts project the pattern forward with a confidence band, and anomaly detection flags points the pattern didn't predict.
The Analytics pane (magnifying glass icon when a supported visual is selected) adds these elements without DAX. Availability depends on visual type.
Reference lines: constant line (a fixed target such as 1,000,000 or a value from a measure), min line, max line, average line, median line, percentile line, and trend line, each with labels and formatting. X-axis and Y-axis constant lines are available on scatter charts. Use them to show targets and benchmarks directly on the chart.
Error bars show uncertainty or ranges around values by binding upper and lower bound fields or measures (for example, a confidence interval or min and max), displayed as bars, lines, or bands. They're useful for survey results, estimates, and measurements with known variability.
Forecast projects a time series forward. It's available on line charts with a continuous date/time axis (single measure, no legend). Options include forecast length (units of time), ignore last points (to exclude incomplete periods), confidence interval (such as 95%), and seasonality (number of points per cycle, detected automatically or set manually). The forecast uses exponential smoothing and draws the prediction with a shaded confidence band.
Anomaly detection (line charts with time series data): Find anomalies in the Analytics pane marks points outside the expected range, with an adjustable sensitivity and an expected-range band. Selecting an anomaly opens a pane with possible explanations, fields that may have contributed, chosen from fields you add to Explain by.
Outliers in non-time data are often spotted with scatter charts (points far from clusters), clustering (4.3.1), box-and-whisker style custom visuals, or measures that flag values beyond a threshold (for example, more than two standard deviations from the mean) combined with conditional formatting.
⚠️ Exam Trap: Forecasting and anomaly detection require a line chart with a continuous time axis. When a stem's visual is a bar chart or uses a categorical (text) month axis, the fix is changing to a line chart with a date field on a continuous axis, not adding a DAX forecast measure.
Reflection Question: A weekly sales line chart shows a forecast that ignores an obvious yearly pattern. Which two forecast settings would you check, and why might the current, incomplete week distort the forecast?