MSBA-262 · Lesson 6 of 12 · 18 min
Analytics features: forecasting and anomalies
▶ Video coming soon A video version of this lesson is on the way.
In early November Dr. Okwuosa-Bell asked a question that the report could not yet answer. Weekly tutoring bookings had climbed all term, and she wanted to know whether Student Success would need more tutors in the winter term. Kwabena could have exported the data and built a model in a spreadsheet, but Power BI already had the tools for a first answer inside the report itself.
This lesson covers the PL-300 objectives under *identify patterns and trends*: using reference lines, error bars and forecasting; detecting outliers and anomalies; using grouping, binning and clustering; and using the Analyze feature. These tools sit mostly in the Analytics pane, the third tab of the Visualizations pane next to Build and Format, and in the context menus of data points.
The Analytics pane
The Analytics pane adds statistical overlays to a visual without changing its data. Which overlays are offered depends on the visual type: line charts offer the most, bar and column charts several, scatter charts a different set, and cards none. The common ones are summarized below.
| Overlay | What it shows | Typical visuals |
|---|---|---|
| Constant line | A fixed value, such as a target | Line, bar, column, scatter |
| Min, max, average, median lines | A summary of the plotted values | Line, bar, column |
| Percentile line | A chosen percentile of the plotted values | Line, bar, column |
| Trend line | A fitted straight line through the series | Line, column, scatter (continuous axis) |
| Error bars | A range around each value from measures or percentages | Line, bar, column |
| Forecast | Projected future values with a confidence band | Line chart (continuous date axis) |
| Find anomalies | Points outside the expected range | Line chart (time series) |
| Symmetry shading, ratio line | Areas above or below the line where x equals y; the overall ratio | Scatter |
Reference lines
Reference lines turn a chart from *here are the numbers* into *here is how the numbers compare*. Kwabena added a constant line at 80 to the retention by campus chart, labelled *Target 80*, which made it obvious which campuses were below. A constant line's value can come from a measure rather than a typed number, which matters when targets differ by year or by campus; the line then moves with the filters. On the weekly bookings chart, an average line showed the term's typical week, and readers could see at a glance which weeks were busy.
Each line has formatting: colour, style, transparency, a data label showing its value or name, and position in front of or behind the data. Kwabena kept reference lines thin, dashed and grey, with the data label at the right, so they guided the eye without competing with the data.
Trend lines
A trend line fits a straight line through a series and shows its general direction. It needs a continuous axis, so a line chart on a date axis set to continuous qualifies, while the same chart on a categorical axis does not offer it. On the scatter chart of tutoring hours per student against course completion by program, the trend line sloped upward: programs where students booked more tutoring tended to have higher completion.
Kwabena was careful about what the line meant. A trend line describes an association in the plotted data; it does not show that tutoring causes completion. Programs with more motivated students might both book more tutoring and complete more courses. He wrote *associated with* in the chart's subtitle, not *leads to*, and Rupert approved the wording before the page was published.
Error bars
Error bars show a range around each value. They can be defined by an upper and lower bound measure, by a percentage of the value, or by a standard deviation calculation, depending on the options offered. Kwabena used them on the course satisfaction chart, where each program's average rating came from a survey: upper and lower bound measures showed the margin of error, which was wide for small programs with few responses. Readers could see that the gap between two small programs was within the noise.
Forecasting
The forecast overlay projects a line chart's series into the future using exponential smoothing, a well-established statistical method that weights recent observations more heavily. It is available on line charts with a single series on a continuous date or number axis. The options are:
| Forecast option | What it controls |
|---|---|
| Forecast length | How many points or time units to project forward |
| Ignore the last | How many recent points to leave out, for incomplete periods or testing accuracy |
| Seasonality | The length of a repeating cycle, detected automatically or set manually |
| Confidence interval | The width of the shaded band, such as 80, 90, 95 or 99 percent |
Kwabena turned on the forecast for weekly tutoring bookings with a length of 15 weeks, the length of the winter term. The first result looked odd: a flat line with a wide band. The reason was the current week, which was only half over and showed half the usual bookings. Setting ignore the last to 1 removed the partial week, and the forecast became more sensible. He then set seasonality to 15 points, the length of a term, because bookings followed the same shape every term: low at the start, a peak before midterms, a second peak before finals.
A forecast is a projection of past patterns, not a prediction that accounts for new causes. It cannot know that the college is adding a nursing intake in January. Kwabena's practice was to test a forecast against the past: ignore the last 10 weeks, forecast those 10, and compare the projection with what actually happened. The test showed the forecast within about 10 percent most weeks, which was good enough for planning staffing ranges, and he said so in the page's subtitle. Forecasting is not available in every situation; for example, it requires a single series, so a line chart with a legend or several values cannot be forecast.
Detecting anomalies
The second analytics tool on line charts is Find anomalies, in the Analytics pane. It is available for line charts with time series data on the axis, and the series needs at least four data points. Power BI builds an expected range for each point from the series' own history and marks points outside the range as anomalies, with the expected band shaded. A sensitivity slider controls how readily points are flagged: higher sensitivity flags smaller deviations, lower sensitivity only the most pronounced ones.
Selecting an anomaly opens an explanation pane that looks for fields in the model whose values help explain the unusual point. Kwabena turned on anomaly detection on daily logins to the student portal. A spike on a Monday in late September was flagged, and the explanation pointed to the Lakeshore campus and to the program field: a large group of health students had been asked to complete an online module that day. The Explain by field well lets authors limit the explanation to chosen fields, which Kwabena used to keep the analysis focused on campus, program and student type.
Anomaly detection has limits worth knowing for the exam. It does not work on line charts with a legend, with several values or with a secondary axis. It cannot be combined with forecast or with min, max, average, median and percentile lines on the same chart. It is not supported in some data scenarios, such as live connections to Analysis Services and Power BI Report Server, and explanations do not work with *Show value as* options. Drilling down a hierarchy on the chart is not supported either.
Outliers outside line charts
Anomaly detection is a time series tool. For outliers in other kinds of data, the study guide's wording *detect outliers and anomalies* points to ordinary techniques. A scatter chart shows outliers as points far from the cloud. A measure can flag values more than a chosen number of standard deviations from the mean, and conditional formatting can colour them. A Top N filter or a sorted table shows extremes. Kwabena flagged course sections whose withdrawal rate was far above their program's average with a measure, and listed them on a page for deans.
Grouping, binning and clustering
Three features create new categories from existing data, directly in the report or model view. Grouping combines selected categories into a group, such as the four smallest programs into *Other health programs*, by selecting data points and choosing Group from the context menu or the field's menu. Binning splits a numeric or date column into equal ranges, such as students' ages in five-year bins or credits in bands of three, which turns a column chart into a histogram. Both create new fields in the model that can be used in any visual.
Clustering finds groups of similar data points in a scatter chart. From the scatter chart's More options menu, Automatically find clusters asks for a field to cluster by and a number of clusters, or lets Power BI choose. The result is a new cluster field. Kwabena clustered programs by tutoring hours per student and completion rate, and Power BI found three clusters: high tutoring with high completion, low tutoring with high completion, and low tutoring with low completion. The third cluster became the focus of a winter outreach campaign.
The Analyze feature
The Analyze feature, from the context menu of a data point, offers two automatic analyses. Explain the increase or Explain the decrease compares a data point with the previous one and looks for fields in the model that best explain the change, showing the results as small charts that can be added to the report. Find where this distribution is different compares the distribution of a selected category with the overall distribution and highlights fields where they differ most.
When fall intake at Ridgeview fell from the previous year, Kwabena right-clicked the Ridgeview column and chose Analyze, then Explain the decrease. The results showed that most of the drop came from part-time students in two business programs, a pattern he had not spotted. Analyze works on many visuals with numeric values, but not on all; it does not support some measures and model features, and its suggestions are starting points for investigation, not conclusions.
Worked problem
Answering the winter tutoring question
Dr. Okwuosa-Bell wants to know whether Student Success needs more tutors in winter. Kwabena has weekly bookings for four terms, including the current partial week. How should he use the analytics features to give a first answer?
Show solution
- Use a line chart with week on a continuous axis and total bookings as the single value.
- Turn on the forecast with a length of 15 weeks, ignore the last 1 point, and set seasonality to 15.
- Test the forecast by temporarily ignoring the last 10 weeks and comparing the projection with actuals.
- Add a constant line from a measure for current tutoring capacity, so weeks above capacity stand out.
- Write a subtitle that states the forecast range and its limits, such as the new nursing intake not being reflected.
Answer: The forecast showed six winter weeks above current capacity, with an uncertainty band of roughly plus or minus 10 percent. Student Success planned for two extra tutors during the midterm and finals peaks.
Choosing the right analysis tool
With several tools available, Kwabena kept a short guide on the help page of his own development report. A question about *the target* pointed to a constant line from a measure. *The usual level* pointed to an average or median line. *The general direction* pointed to a trend line. *Next term* pointed to a forecast. *Something odd on one day* pointed to anomaly detection on a time series. *What changed between two periods* pointed to Analyze. *Which items are alike* pointed to clustering. Matching the question to the tool kept him from reaching for the most impressive feature when a simpler one answered the question better.
Common mistakes
MistakeForecasting with the current incomplete period included.
InsteadUse Ignore the last to leave out partial periods.
MistakeReading a trend line as proof of cause.
InsteadDescribe it as an association and look for other explanations.
MistakeExpecting anomaly detection on a line chart with a legend.
InsteadUse a single series; anomaly detection does not support legends or multiple values.
MistakeTreating Analyze results as conclusions.
InsteadTreat them as leads and check them with the data owner.
MistakeTyping targets as fixed constant lines when they vary.
InsteadBase constant lines on a measure so they follow the filters.
Summary and key terms
- The Analytics pane adds reference lines, trend lines, error bars, forecasts and anomaly detection, depending on the visual.
- Constant lines from measures show targets that follow the filters.
- Trend lines and forecasts need a continuous axis; forecasting needs a single series on a line chart.
- Forecast options are length, ignore the last, seasonality and confidence interval; test forecasts against the past.
- Anomaly detection flags time series points outside an expected range and suggests explanations, with documented limits.
- Grouping, binning and clustering create new categories; Analyze explains increases, decreases and distribution differences.
- Analytics pane
- The Visualizations pane tab that adds statistical overlays to a visual.
- Constant line
- A reference line at a fixed value or a value from a measure.
- Forecast
- A projection of a line chart's series using exponential smoothing, with a confidence band.
- Seasonality
- The length of a repeating cycle in a time series, used by the forecast.
- Anomaly detection
- A line chart feature that marks points outside an expected range and suggests explanations.
- Binning
- Splitting a numeric or date column into equal ranges to create a new field.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Why did the first forecast of tutoring bookings look flat?
Show answer
The current partial week was included; ignoring the last point fixed it.
Which visual type supports automatically finding clusters?
Show answer
The scatter chart.
What does Explain the decrease compare?
Show answer
A data point with the previous one, looking for fields that explain the change.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.