Trending

World technology news

→
Power BI 2022 retrospective: Choose a measure and axis with field parameters
Business Intelligence · 2022
Business Intelligence2022

Power BI 2022 retrospective: Choose a measure and axis with field parameters

Revisit the May 2022 field parameters preview with a four-row sales model, independent axis and metric choices, and explicit totals and slicer checks.

Archive retrospective · Topic year 2022

Developer's JournalPublished: Nov 27, 20266 min read
Reading progress0%
In this article
  1. What the May 2022 preview changed
  2. Build a four-row model with explicit measures
  3. Create independent axis and metric parameters
  4. Test all four combinations with known values
  5. Show the unit alongside the displayed metric
  6. Keep the pilot useful after the preview era

What the May 2022 preview changed

Power BI Desktop introduced field parameters as a preview in May 2022. A field parameter lets a report reader choose which field or measure a visual uses. In a sales report, region and channel can share a chart. The reader can choose either dimension for the horizontal axis, then independently decide whether to see net revenue or units sold. A single visual can support two related questions without duplicating the layout. This retrospective uses current Microsoft Learn guidance to describe the workflow and the release archive to establish the feature’s historical origin. Menu details can differ across releases. Begin by separating field selection from the business calculation. Revenue and quantity should already be defined correctly before the reader changes the visual. The small example keeps both expectations observable.

Build a four-row model with explicit measures

Create PilotSales in a blank Power BI Desktop file. It contains two regions, two channels, and four sales rows. The amounts use whole numbers in one currency. A real organisation must define what net revenue includes and how returns, tax, and discounts affect it. Here the source value is already net. Create the two measures separately. Use a basic table to check the values before building the interactive chart. Revenue totals 300 and units total 10. Grouped by region, North contributes 200 revenue and five units. South contributes 100 revenue and five units. Grouped by channel, Store contributes 160 and four. Online contributes 140 and six. Reproducing those figures establishes the baseline. Later differences should follow the chosen combinations rather than a change to the source calculation.

Application flowConceptual sketch · summary of the article's technical flow
PilotSales =
DATATABLE (
    "Region", STRING, "Channel", STRING,
    "NetRevenue", INTEGER, "Units", INTEGER,
    {
        { "North", "Store", 120, 3 },
        { "North", "Online", 80, 2 },
        { "South", "Store", 40, 1 },
        { "South", "Online", 60, 4 }
    }
)

// Create each as a separate measure.
Net Revenue = SUM ( PilotSales[NetRevenue] )
Units Sold = SUM ( PilotSales[Units] )

Create independent axis and metric parameters

Use the Modeling interface to create two field parameters. For Sales Axis choose the Region and Channel columns. For Sales Metric select Net Revenue and Units Sold. The generated expression lists each display name, its NAMEOF field reference, and an order. The example shows the shape of those definitions. Create the parameter through the interface, which sets the accompanying semantic-model metadata. Copying the expressions into an ordinary calculated table does not establish that metadata by itself. Add a column chart and place Sales Axis on the horizontal axis and Sales Metric in the value field. Add a slicer for each parameter. Set a single-selection experience for this exercise, so every combination has one dimension and one unit. Let the existing measures remain responsible for calculation and numeric formatting. Leave PilotSales as the home table for both measures when using the references shown. If you move a measure to another home table, use the field reference generated for your model.

// Generate these through Modeling > New parameter > Fields first.
// The generated table definitions should follow this pattern.
Sales Axis = {
    ( "Region", NAMEOF ( 'PilotSales'[Region] ), 0 ),
    ( "Channel", NAMEOF ( 'PilotSales'[Channel] ), 1 )
}

Sales Metric = {
    ( "Net revenue", NAMEOF ( 'PilotSales'[Net Revenue] ), 0 ),
    ( "Units", NAMEOF ( 'PilotSales'[Units Sold] ), 1 )
}

Test all four combinations with known values

Start with Region and Net revenue. The visual should show North 200 and South 100. Switch to Channel without changing the measure and check Store 160 and Online 140. Switch the measure to Units and expect Store four and Online six. Switch the axis to Region again and expect five units for each region. If the result appears unchanged, review the slicer interaction and check which parameter is present in each visual field. Also verify what happens when the report is reopened and when a saved selection is cleared. The Microsoft documentation explains that selecting no fields in the parameter slicer can behave like selecting all fields. Decide how your particular report handles that state. The intended user experience should be understandable outside the most favorable click sequence.

Show the unit alongside the displayed metric

Revenue and units are different quantities. A fixed chart heading that still says revenue after a reader switches to units is misleading. Keep the measure name and number format apparent. A different currency, conversion rate, or rounding rule belongs to the model’s measure definition. The field parameter chooses which result the chart requests. It is not a currency conversion mechanism. If several axes or measures can be selected at once, consider how crowded the corresponding visual becomes. The single-selection pilot limits that ambiguity. A separate check table can be useful when a reader needs both totals and comparisons. Test the title, number formatting and tooltips together because people should be able to tell which unit changed even if they did not see the previous state.

Keep the pilot useful after the preview era

The four rows are synthetic and establish behavior rather than a performance benchmark. Access controls need a separate review. Adding a parameter choice does not change which rows a reader is authorised to see. Test with the intended report roles and confirm sharing settings independently. Verify that keyboard users can change the slicers and understand what the chart displays. Those checks apply regardless of the modest data size. The current Microsoft Learn page documents additional scope and connection limitations. Explicit measures avoid relying on automatic aggregation in the pilot. Write the four combinations and expected results into your publication notes before expanding the report. They provide a small acceptance check for future changes to field names, business definitions, or layout. This preserves the useful 2022 idea while making its contemporary behavior verifiable.

Be the first reader ✎ Write a comment

Reader discussion

Discussion prompt

Which DAX or data model metric would you check first when applying this approach?

No comments yet. Be the first to contribute.

Write a comment

Comments are real visitor contributions. Repeated, link-heavy or abusive submissions may be limited.