9.3 Advanced Analytics Patterns
Key Takeaways
- What-if parameters auto-generate a value table, a measure, and a slicer for live scenario analysis; this is scenario modeling, not forecasting/prediction.
- Anomaly detection on time-series line charts flags out-of-band points with a tunable sensitivity and contributing-factor explanations.
- The Smart narrative visual auto-writes an editable, filter-aware text summary with dynamic measure-bound values.
- R and Python visuals run custom statistical code but render as static images with no interactivity, require an installed runtime, and accept at most 150,000 (de-duplicated) input rows.
- Combining anomaly detection, Key Influencers, Decomposition Tree, what-if, and smart narrative creates a full self-service analytics experience.
Quick Answer: Beyond standard charts, Power BI supports what-if parameters (sliders for scenario analysis), anomaly detection (flag unexpected time-series points), smart narrative (auto-generated text summaries), and R/Python visuals (custom statistical code). The recurring exam skill is matching a goal — model assumptions, find outliers, summarize in prose, run custom stats — to the right feature, and knowing the limits of each.
What-if parameters
Modeling tab -> New parameter -> Numeric range (older builds label this "What if"). Configure Name, data type, Minimum, Maximum, Increment, and Default. Power BI generates three things automatically: a calculated table of values from min to max, a measure that returns the slider's selected value (e.g., Growth Rate Value), and a slicer for the user.
Use the value measure in your own DAX:
Projected Revenue =
SUM(Sales[Amount]) * (1 + [Growth Rate Value])
As the user slides Growth Rate (0%-50%), projected revenue recalculates live. Typical scenarios: price sensitivity (impact of a 10% price increase), discount impact, headcount planning at different growth rates, and budget reallocation across channels. What-if is scenario analysis (you choose the assumption); contrast it with forecasting, which predicts the future from history.
Anomaly detection
On a line chart with a time axis, enable Analytics pane -> Find anomalies. Power BI builds an expected-value model, marks points outside the expected band, and lets you tune sensitivity (higher flags more anomalies). Click a marker to see expected vs. actual, the dimensions that contributed most, and a confidence indication. This is the fastest way to surface unexpected spikes or drops without writing statistical code.
Smart narrative (Copilot-powered)
The Smart narrative visual auto-writes a text summary of the page or a selected visual — totals, trends, top/bottom contributors, and notable changes — and updates dynamically with filters. You can edit the generated text and insert dynamic values (bound to measures) so a sentence like "Revenue is $3.5M, up 12% from last quarter" stays current. It is ideal for adding an executive-readable explanation alongside the charts.
R and Python visuals
Add a R script visual or Python visual, drag fields in, and write code that plots:
library(ggplot2)
ggplot(dataset, aes(x=Revenue, y=Profit)) +
geom_point() + geom_smooth(method="lm")
import seaborn as sns
sns.histplot(dataset['Revenue'], kde=True)
Limits to memorize: they render as static images (no tooltips, no cross-filtering), they require an R/Python runtime installed (locally in Desktop), they accept at most 150,000 rows of input, the data is de-duplicated before being passed in, and in the service they run only on supported capacities. Their value is custom statistics/ML the native visuals can't do; the cost is interactivity.
Combining techniques
A strong analytics page layers them:
| Visual | Role |
|---|---|
| Line chart + anomalies | Surface unexpected points |
| Key Influencers | Explain what drives the metric |
| Decomposition Tree | Drill into root cause |
| What-if slicer | Model alternative assumptions |
| Smart narrative | Summarize the findings in prose |
What-if parameter: the full mechanics
Understanding the three auto-generated artifacts is exam-relevant. When you create a numeric-range parameter named "Growth Rate" from 0 to 0.5 in steps of 0.05, Power BI writes a DAX calculated table roughly like Growth Rate = GENERATESERIES(0, 0.5, 0.05), adds a measure Growth Rate Value = SELECTEDVALUE('Growth Rate'[Growth Rate], 0.1), and drops a slicer bound to the table on the canvas. Your own measures reference the Value measure, not the table column, so the selected slider position flows into the calculation.
Two subtleties: the parameter table is disconnected (no relationship to fact tables — it only feeds measures), and SELECTEDVALUE returns the default when nothing or multiple values are selected, which is why you set a sensible default.
Smart narrative deeper dive
Smart narrative is Copilot-adjacent: it auto-writes prose about the current page or a selected visual and recomputes as filters change. You can edit the generated sentences, delete ones you don't want, and insert dynamic values by typing + and binding to a measure so a number like total revenue or growth percentage stays live. It is the right answer whenever a scenario asks for an "automatically generated, plain-language summary that updates with the data" — distinguish it from a static text box (which never updates) and from the Q&A visual (which answers a typed question rather than summarizing).
R/Python visuals — capabilities and the limits that get tested
R and Python script visuals let you run any plotting/statistics/ML code the language supports — clustering with scikit-learn, a ggplot regression, a custom forecast — and surface the output in the report. But memorize the constraints, because the exam tests them as distractors:
| Limit | Detail |
|---|---|
| Static image | Output is a rendered image — no tooltips, cross-filtering, or drill |
| Runtime required | R or Python must be installed (locally for Desktop authoring) |
| Row cap | At most 150,000 rows are passed to the script |
| De-duplication | Duplicate rows are removed before the data reaches the script |
| Service support | Runs in the service only on supported/Premium capacities |
Their value is doing what native visuals cannot; their cost is interactivity and setup. If a scenario needs an interactive, drillable visual, a script visual is the wrong choice.
On the exam
Expect "explore growth-rate assumptions" -> What-if parameter (and know it builds a disconnected table + value measure + slicer); "flag unexpected values in a time series" -> Anomaly detection; "auto-generate a written summary that updates with filters" -> Smart narrative; and a limitation question on R/Python visuals (static images, no interactivity, 150,000-row cap, de-dup, runtime required). Distinguish what-if (scenario) from forecasting (prediction).
A financial analyst wants to explore how different growth rate assumptions (5%, 10%, 15%, 20%) affect projected revenue. Which Power BI feature is most appropriate?
Anomaly detection in Power BI works with which type of visual?
What is a key limitation of R and Python visuals in Power BI?
A report author wants an automatically generated, filter-aware text paragraph that summarizes the key trends shown on a page. Which feature should they add?