Smart Statistics · Practical Power BI tutorial
One Chart, Three Questions: Build a Power BI Metric Selector
A sales chart tells you where revenue comes from. It does not tell you which channel contributes the most gross profit, or which earns the strongest margin. Give your team a deliberate way to change the question without opening another report.
This tutorial builds a single-select field parameter using a small commercial dataset. You will create explicit measures, configure one chart and test whether the labels, units and totals remain trustworthy.
For: UK business report owners and Power BI authors. Prerequisite: Power BI Desktop with an editable local model. Technical guidance checked on 9 November 2026.
Illustrative example · Training data, not client results
Commercial performance / selected view: Sales
Start with the decision, then the selector
A commercial manager is deciding where to focus a channel review. Revenue, contribution and efficiency answer different questions. Switching between them should change the interpretation as clearly as it changes the bars.
Sales: scale
Which channel brings in the most revenue? In the training data, Trade leads. This is useful for understanding commercial exposure, but it does not establish profitability.
Gross profit: contribution
Which channel contributes the most after cost of sales? Online leads in this example. Check what the business includes in cost of sales before using this ranking.
Margin: efficiency
How much gross profit comes from each pound of sales? Retail leads on percentage, despite its smaller contribution. A high percentage alone is not a reason to shift investment.
Choose this approach when the same audience compares the same categories using a short list of agreed measures. Keep separate visuals when readers need simultaneous comparison, different chart types or different access permissions. A field selector is not an access-control mechanism.
Build the selector in Power BI Desktop
Prepare a small, reconciled dataset
In a new training report, choose Home → Enter data. Create the columns below and name the table Sales. Enter amounts as numbers without currency symbols. Set Channel to Text and both amount columns to Fixed decimal number. Each row represents one channel for one common reporting period; this is a teaching summary, not an invoice ledger.
| Channel | SalesAmount | CostAmount |
|---|---|---|
| Trade | 60000 | 51000 |
| Online | 30000 | 19000 |
| Retail | 10000 | 5000 |
For a production model, use the existing validated sales fact table and channel dimension. Agree treatment of VAT, credit notes, rebates and unallocated costs with Finance. Do not append this training summary to transaction data: doing so would double-count sales.
Create measures that keep their meaning
Select the Sales table and use New measure for each definition below. Create four separate measures, one block at a time. Keep their home table as Sales so the parameter references match.
Sales Value = SUM('Sales'[SalesAmount])
Cost Value = SUM('Sales'[CostAmount])
Gross Profit = [Sales Value] - [Cost Value]
Gross Margin = DIVIDE([Gross Profit], [Sales Value])
Format Sales Value, Cost Value and Gross Profit as GBP currency; format Gross Margin as a percentage with one decimal place. Do not convert these measures to text with FORMAT. DIVIDE returns blank for a zero denominator when no alternative is supplied; a blank margin is different from a genuine zero margin. Microsoft: DIVIDE.
The total margin is total gross profit divided by total sales. Averaging the three channel percentages would incorrectly give 33.9%, instead of 25.0%. This distinction matters whenever channels differ in size.
Create the field parameter
Choose Modelling → New parameter → Fields. Name it Metric, select Sales Value, Gross Profit and Gross Margin, and select the option to add a slicer to the page. Create the parameter through this dialogue so Power BI adds the required metadata. Then select its generated table and use this complete replacement definition to give the choices plain business labels:
Metric = {
("Sales", NAMEOF('Sales'[Sales Value]), 0),
("Gross profit", NAMEOF('Sales'[Gross Profit]), 1),
("Margin", NAMEOF('Sales'[Gross Margin]), 2)
}
Use explicit measures, not automatic column aggregations. The trailing numbers define display order; they are not financial thresholds. Leave the generated parameter table disconnected. Microsoft: field parameters.
Connect one chart and make the choice obvious
Insert a clustered bar chart. Put Sales[Channel] on the Y-axis and the Metric parameter on the X-axis, replacing any fixed measure already there. Configure the parameter slicer for single selection, turn off Select all and select Sales as the saved default.
Title the slicer “Choose a measure”. Enable data labels, use automatic axis bounds and set display units to None for this small test. Avoid a fixed currency axis title: use “Selected measure” and show the active measure prominently beside the chart. Test each currency and percentage format in the actual visual.
For a dynamic title, create the following measure. It reads the generated order column rather than the parameter display column. Set the chart title’s conditional formatting to Field value and select Chart Title.
Chart Title =
VAR MetricOrder = SELECTEDVALUE('Metric'[Metric Order], -1)
RETURN
SWITCH(
MetricOrder,
0, "Sales by channel (£)",
1, "Gross profit by channel (£)",
2, "Gross margin by channel (%)",
"Select one measure"
)
This title mapping follows the parameter’s three ordering values. If you change those entries, update the mapping in the same release. SELECTEDVALUE supplies the fallback when there is not one distinct order value. Microsoft: SELECTEDVALUE.
Prove every selection before rollout
Build a temporary table with Channel and all three measures. Compare it with the chart after each selection. Test channel filters, no-data selections and saved report defaults. Decide whether bars stay in channel order or reorder by the selected measure; explain that choice to readers.
| Channel | Sales | Gross profit | Margin |
|---|---|---|---|
| Trade | £60,000 | £9,000 | 15.0% |
| Online | £30,000 | £11,000 | 36.7% |
| Retail | £10,000 | £5,000 | 50.0% |
| Total | £100,000 | £25,000 | 25.0% |
Use a separate test copy to add a zero-sales row and confirm that margin is blank. Try clearing the parameter filter too: Power BI treats no field selection as all fields, not as “show nothing”. Check bookmarks and reset behaviour so they cannot unexpectedly restore mixed units.
Diagnose the misleading result
| Symptom | Likely cause | Correction |
|---|---|---|
| Margin appears beside pound values | Multiple parameter entries are selected. | Restore one selection and inspect slicer, bookmark and filter states. |
| The bars change but the title says Sales | A fixed title survived the redesign. | Bind Chart Title and verify all three choices. |
| Overall margin looks too high | Row percentages were averaged. | Divide the two aggregate measures and reconcile with Finance. |
| A parameter cannot be created | The report uses a live connection without a local model. | Review the model design with its owner; do not add a local model casually to a governed report. |
Microsoft documents the local-model requirement and the behaviour of empty parameter selections. This tutorial deliberately uses an editable local model and a small, controlled menu.
Keep flexibility accountable
Finance owns definitions
Record what Sales and Cost include, which period is being shown and how credits are treated. Approve changes before they alter the meaning of a selector option.
The report owner owns behaviour
Maintain parameter entries, formats, title mappings and test evidence together. Recheck bookmarks, exports and viewing permissions in the intended service environment.
Managers own the decision
Ask a pilot user to identify the largest channel, the largest contribution and the strongest margin. Then ask them to explain why these are different. Demonstrate the selector during a real review.
Measure success through a timed comparison task, the number of interpretation errors and follow-up requests for duplicate charts. Compare a small baseline with the pilot using the same questions. Fewer charts are useful only if people reach the right conclusion more easily; no saving is assumed here.
Is your selector ready for a pilot?
This local checklist records no data and sends nothing. The score measures completed checks, not financial accuracy or a formal assurance rating.
Frequently asked questions
Does a field parameter change the underlying data?
No. It changes the fields or measures used by a visual. The calculations and the current filter context still determine the results.
Can this tutorial be used with a live connection?
This tutorial assumes an editable local model. Microsoft states that field parameters cannot be created in a live-connected report without a local model.
Why should the slicer allow only one metric?
This example mixes pounds and percentages. A single selection keeps the chart focused on one unit and makes the current business question easier to recognise.
Is a metric selector a security control?
No. Removing a measure from the menu is a presentation choice. Review the model and report permissions separately before sharing sensitive financial information.
Smart Statistics · Better reporting decisions
Make the next click answer a better question
Smart Statistics can help you turn crowded Power BI reports into clear, governed decision tools — with agreed measures, purposeful interactions and testing that reflects how your team works.