4.3 · Parameters: field parameters & what-if

Level 4 · Design, security & performance

4.3Parameters: field parameters & what-if

Goal: Build a measure switcher, a what-if simulator, and know where each type of parameter applies.
Estimated time: 18 min · self-paced reading · If you only have 5 min: read “The essentials in 30s” + the diagram.

The essentials in 30 seconds

  • The field parameter: a slicer that swaps the measure shown (Revenue / Margin / Quantity) or the axis (by region / by product) of one visual — the multi-angle report on a single page.
  • The numeric what-if parameter: a slider (e.g. % increase) whose value is read by SELECTEDVALUE and injected into the measures to simulate.
  • Power Query parameters make the source configurable (path, year): two worlds, two menus — source on one side, analysis on the other.

Running mini-case — Zineb gives her management a chameleon report

Zineb, a management controller at an agri-food SME in Algiers, is drowning in pages: one per measure (Revenue, margin, quantity) and one per axis (region, product). Instead of multiplying pages, she applies the method. She creates a field parameter (Modeling → New parameter → Fields) with [Total revenue], [Sales count], [Average basket]: a slicer swaps the measure shown in her bar chart. She adds an axis parameter (Region, Product, Salesperson): the same visual pivots. Then she creates a what-if "Increase %" (0 to 20) and the measure Simulated revenue = [Total revenue] * (1 + 'Increase %'[Increase % Value] / 100), placed next to the real revenue: management can test a scenario. She has replaced entire pages with a single controllable visual.

Standalone case for this section: it returns in the course, the diagram, the script and the 48h challenge of section 4.3.

1. The field parameter: the chameleon visual

The field parameter (Modeling → New parameter → Fields) creates a list of measures or columns that a slicer can swap in a visual. You drag the parameter onto the axis: the slicer then changes the measure shown (Revenue / Margin / Quantity) or the axis (by region / by product). A single visual, several angles — two pages saved. Zineb places the parameter on the Y-axis of her bar chart.

2. What-if: simulate

The what-if parameter (New parameter → Numeric range) creates a slider whose value is read by SELECTEDVALUE and injected into the measures. Example: Simulated revenue = [Total revenue] * (1 + 'Increase %'[Increase % Value] / 100). You place the real and the simulated side by side: management tests "what if we increase by 10%?". SELECTEDVALUE is the slicer → DAX gateway.

3. Power Query parameters

Don't confuse two worlds. Power Query parameters (in the query editor) make the source configurable — file path, year, environment — without rewriting the steps. Model parameters (field, what-if) serve analysis. Zineb puts her source path in a Power Query parameter and her analysis angles in model parameters: two menus for two needs.

Common misinterpretation: "The field parameter cleans my data, what-if is for publishing, and I can stack ten sliders." No, three mistakes. The field parameter swaps the measure or the axis of a visual — it cleans nothing (that's Power Query). What-if simulates a scenario with a slider; it doesn't publish. And you stay at 1-3 levers: beyond that, usability degrades — a real multivariable model changes tool.
A controllable report The user chooses the angle, the measure and the scenario — the same report serves ten analyses. Field parameterSwaps measure or axis+What-ifSlider injected into the measures+SELECTEDVALUEReads the user's choice Power Query parameters = source; model parameters = analysis.
The user chooses the angle, the measure and the scenario — the same report serves ten analyses.
Text version of the diagram (SEO / screen readers / translation): 1) Zineb, a management controller in Algiers, replaces her dedicated pages with a controllable report: a field parameter (Modeling → New parameter → Fields) that a slicer swaps to change the measure or the axis of the same visual. 2) She adds a what-if (New parameter → Numeric range): an "Increase %" slider whose value, read by SELECTEDVALUE, is injected into the Simulated revenue measure to simulate a scenario. 3) She distinguishes the two worlds: Power Query parameters set the source (path, year), model parameters serve the analysis. Lesson: fewer pages, a chameleon visual and a slider — but never more than 1-3 levers.

🔎 Concrete example — 🔎 Concrete example — The what-if simulator

Zineb has management test a hypothesis:

New parameter → Numeric range "Increase %" (0 to 20, step of 1)

Simulated revenue = [Total revenue] * (1 + 'Increase %'[Increase % Value] / 100)
→ [Total revenue] and [Simulated revenue] side by side with the slider: simulated scenario.

Reading: the slider doesn't change the data: it feeds a simulation measure.

Lesson: SELECTEDVALUE connects the what-if slicer to DAX.

Section vocabulary

Field parameter
Modeling → New parameter → Fields: the list of measures/columns that a slicer can swap in the visuals.

Simple example: Zineb alternates between revenue, margin and quantity on the same bar chart.

What it is not: creating one page per measure.

Reflex: one visual, several measures → field parameter.

What-if parameter (numeric)
Modeling → New parameter → Numeric range: a slider whose value (SELECTEDVALUE) is used in the measures.

Simple example: Zineb sets an increase of 0 to 20% with the slider.

What it is not: a hypothesis frozen in the formula.

Reflex: simulate a scenario → what-if.

SELECTEDVALUE
The function that reads the parameter's chosen value: Simulated revenue = [Total revenue] * (1 + 'Increase %'[Increase % Value] / 100).

Simple example: Zineb reads it to wire the slider to DAX.

What it is not: a constant hard-coded.

Reflex: slicer → DAX goes through SELECTEDVALUE.

Power Query parameter
A query parameter (file path, environment): the source becomes configurable without rewriting the steps.

Simple example: Zineb exposes her source path as a reusable parameter.

What it is not: a path hard-coded in the query.

Reflex: configure the source → Power Query.

Driven report
The result: the user chooses the angle, the measure, the scenario — the same report serves ten analyses.

Simple example: Management explores revenue/margin and simulates an increase.

What it is not: a page frozen per question.

Reflex: fewer pages, more control.

In practice — In practice — The chameleon visual and the simulator

  1. Field parameter: Modeling → New parameter → Fields → check [Total revenue], [Sales count], [Average basket] → the slicer is created. Drag the parameter onto the Y-axis: the slicer changes the displayed measure.
  2. Double it with an axis parameter: Region, Product, Salesperson — the same visual pivots across three angles.
  3. What-if: New parameter → Numeric range "Increase %" (0 to 20, step of 1). Create: Simulated revenue = [Total revenue] * (1 + 'Increase %'[Increase % Value] / 100).
  4. Place [Total revenue] and [Simulated revenue] side by side with the slider: the scenario simulator is born.
A multi-angle, simulatable report — two pages saved and a guaranteed demo effect.

Step-by-step script — driving the report like Zineb (7 min)

1) Modeling → New parameter → Fields: check [Total revenue], [Sales count], [Average basket] and confirm — a slicer is created. 2) Drag this parameter onto the Y-axis of your bar chart: change the slicer value, the displayed measure changes. 3) Create an axis parameter (Region, Product, Salesperson) and place it on the X-axis: the visual pivots. 4) New parameter → Numeric range "Increase %" (0 to 20). 5) Write Simulated revenue = [Total revenue] * (1 + 'Increase %'[Increase % Value] / 100) and place it next to the real revenue with the slider.

Rename the field parameter labels (Table view): "Revenue (DZD)" rather than "Total revenue" — cleaner for the user.

Copy-paste template — my parameters

Field parameter: Modeling → New parameter → Fields
  Measures: [Total revenue], [Sales count], [Average basket]
  Axes    : Region, Product, Salesperson
What-if: New parameter → Numeric range "Increase %" (0-20)
  Simulated revenue = [Total revenue] * (1 + 'Increase %'[Increase % Value] / 100)
Power Query = source; model = analysis. 1-3 levers maximum.

Chameleon visual

Zineb alternates between revenue, margin and quantity on the same bar chart via a field parameter.

Interchangeable axes

Zineb pivots the same visual by region, product or salesperson without a new page.

Simulator

Zineb places the real revenue and the simulated revenue side by side: management tests an increase.

Parameterized source

Zineb exposes the file path as a Power Query parameter to change year without rewriting.

✓ Best practices

  • Rename the field parameter labels ("Revenue (DZD)" rather than "Total revenue").
  • Use SELECTEDVALUE to wire the what-if slider into the measures.
  • Distinguish Power Query parameters (source) from model parameters (analysis).

✗ Common pitfalls

  • Multiplying what-if sliders (beyond 2-3 levers, usability degrades).
  • Confusing a source parameter with an analysis parameter.
  • Forgetting to set the order of the entries (index column).

Key takeaways

  • The field parameter swaps measures or axes of a visual: the multi-angle report on one page.
  • What-if injects a slider into the measures: instant simulation.
  • SELECTEDVALUE reads the user's choice: the slicer → DAX gateway.
  • Power Query parameters for the source, model parameters for the analysis.

48h challenge — apply it tomorrow

Like Zineb, create a field parameter that swaps two measures on the same visual, then a what-if "Increase %" with the Simulated revenue measure (SELECTEDVALUE). Place the real and the simulated side by side and write in one sentence the scenario your management would test.

Section exit checklist
  • I can create a field parameter that changes the measure or the axis of a visual.
  • I know how to build a what-if and wire SELECTEDVALUE into a measure.
  • I distinguish Power Query parameters (source) from model parameters (analysis).
Self-assessment 1-5: does my field parameter carry clear labels?Self-assessment 1-5: did I limit my what-if levers to the essentials?

Frequently asked questions

Can I rename the field parameter entries (clean labels)?

Yes: the parameter table is editable (Table view). Modify the labels column ("Revenue (DZD)" instead of "Total revenue") and set the order via the index column for a polished slicer, presented in a logical order.

Can what-if exceed 3 variables?

Technically yes (one parameter per variable), but usability degrades quickly. Beyond 2-3 levers, change tool: a real simulation model (Excel/solver) or precomputed scenarios.

Check your understanding

What does a field parameter do?

Additional resources (optional, to go further)

Level 4 examFresh, harder questions to test what you've learned