Field parameters

A field parameter is a named list of columns or measures that belongs to a semantic model. Bind it to a visual and add a slicer, and readers switch what the visual shows: for example, Country or Product on the same axis.

Create a field parameter

  1. Open the semantic model, and find the Field parameters section in the BI tables panel.
  2. Click Add field parameter, or right-click the section and choose Add field parameter. The Edit field parameter window opens on a new parameter, named Field parameter 1 or the next free number, with the Dimension kind.
  3. In Parameter name, type a name. The name commits when you leave the field or press Enter. A name that another parameter already uses is refused with Another field parameter already uses this name, and the previous name stays.
  4. Choose the kind, Dimension or Measure, and add entries.

Each change saves as you make it. There is no save button.

Add entries and folders

The pane on the left lists what you can add. In a Measure parameter it offers columns and measures and reads Search columns and measures...; in a Dimension parameter it offers columns only and reads Search columns.... Nothing matches means the search found no field.

  1. Click a source row to add it, or drag it into the entry list. Both add the same entry.
  2. Drag entries to arrange them. Dropping on empty space adds the field at the end of the list, dropping on a folder adds it at the end of that folder, and dropping on an entry places it just above or below.
  3. Double-click an entry to rename it. Enter commits and Escape cancels, and the editor stays open. When the label differs from the field's own name, Reset to the original field name restores it.
  4. On a column entry of a Measure parameter, pick an aggregation: None (group by), Sum, Average, Count, Distinct count, Min or Max. A column starts with the aggregation its type suggests, for example Sum for a number. Measure entries carry no aggregation.
  5. Click Add folder to group entries, and drag entries into a folder. Rename a folder in its header. Empty folders lists folders that hold no entries, and deleting a folder never deletes its fields: they leave the folder.

Dimension or Measure

KindEntriesA bound visual shows
DimensionColumnsThe first entry, until a reader picks another
MeasureColumns and measuresEvery entry at once

A stored kind always wins, so a parameter with mixed entries follows the kind you chose. A parameter saved before kinds existed is read from its entries: one whose entries all summarise acts as a Measure, and anything else acts as a Dimension.

Switching the kind of a parameter that has entries asks you to confirm with Switch to a measure parameter? or Switch to a dimension parameter?, confirmed with Switch. The dialog warns: Fields that do not suit the new kind stay in the list and are flagged, so you can remove them or switch back. An empty parameter switches without a prompt.

Let readers switch fields

  1. Open the report and drag the field parameter from BI tables into a visual. A Dimension parameter goes into a grouping well, such as X-Axis on a bar chart, and a Measure parameter goes into a value well, such as Values. See Visuals for the wells by type.
  2. Add a Slicer from Visualizations, and drag the same parameter into its Field well. A slicer accepts a Dimension parameter and refuses a Measure parameter; slicer settings are on Filters, slicers and interactions.
  3. Readers pick an entry, and every visual bound to the parameter switches to it.

A few things to expect:

Manage and delete a parameter

Right-click a parameter for its menu: Edit fields reopens the editor, and Delete field parameter removes it. Deleting asks Delete field parameter? and warns Visuals bound to "<name>" will show a broken field until you replace it., confirmed with Delete. If the editor is open on the parameter, it closes.

Field parameters belong to the semantic model, so every report built on the model can use them. Changing them needs Edit DataPrism Semantic Model (Who can do what in DataPrism).

Limits and edge cases

Questions, answered

Readers want to switch the axis between Country and Product. Which kind do I use?

A Dimension parameter. The visual shows one entry at a time, and the slicer lets readers choose Country or Product.

Can readers switch a chart between two measures?

Not with a slicer. A slicer refuses a Measure parameter, and a visual bound to one shows every entry at once. Readers switch columns with a Dimension parameter slicer; to build the measures a parameter lists, see Measures.

Can I stop a field parameter slicer from affecting one visual?

Not while the visual uses the parameter: every visual bound to it follows the reader's choice. If a visual must keep one field, bind it to that field itself instead of the parameter.

Can I show a friendlier name for an entry?

Yes. Double-click the entry, type the new name and press Enter. Reset to the original field name brings back the field's own name.

Can I sum a column entry?

Yes, in a Measure parameter: choose an aggregation such as Sum on the column entry, or keep None (group by). In a Dimension parameter the aggregation control does not appear.

Why can't I add a date column to a Measure parameter?

The source list offers only fields that summarise into a chart value, and a date, date time or time column cannot. Add it to a Dimension parameter instead.

What happens to my entries when I switch kind?

They stay in the list. Anything that does not suit the new kind is flagged with a warning icon and still resolves; remove it, or switch back.

Where does a field land when I drop it into the list?

At the end of the list when you drop it on empty space, at the end of a folder when you drop it on that folder, and just above or below an entry when you drop it on that entry.

Why did an entry disappear from my parameter?

Its column or measure no longer exists in the model, so the parameter dropped it the last time it was edited. Check the model, then add the field again if you still need it.

Does a field parameter slicer count toward the slicer values limit?

No. It runs no query of its own, and the Values per load row shows the note A field-parameter slicer runs no query.

Why can't I drag my parameter into a visual?

It has no entry that suits its kind. Add a column to a Dimension parameter, or a column or a measure to a Measure parameter; the row's tooltip tells you the same.

How do I delete a field parameter?

Right-click it in Field parameters, choose Delete field parameter, and confirm with Delete. Visuals that used it show a broken field until you replace it.