Filters and parameters

Give readers controls for dates and values, set fixed filters on a report or page, let charts filter each other, and add parameters that formulas read.

A report narrows its data in five ways. This page covers each one and when to use it. Try the small report below: pick a filter, then click a bar and watch the other charts follow.

Filters, scorecards and charts that filter each other, over sample data.

WayWho sets itUse it for
Filter controlReadersChoices readers make, such as a date range or a region
Report or page filterYou, in the builderNarrowing what the page shows, with no control for readers, such as one product line. Locked, it also limits what a public link or embed can read
Cross-filterReaders, by clicking a chartFollowing a thread from one chart to the rest of the page
ParameterReadersA value formulas read, such as a target
Locked filterYou, with Lock on a report or page filter, or your server, in a signed tokenLimiting what a public link or embed can read, out of the reader's reach

Filter controls

  1. Choose Add, then Filter control.

  2. Pick the dataset and the field in Filters the field.

  3. Choose how readers set it in Readers set it with.

TypeForReaders get
Date range with presetsDatesA calendar and a list of presets
Relative datesDatesPresets only
Single selectAny fieldOne value from a list
Multi-select with searchAny fieldSeveral values, with a search box
Text searchTextA box that matches as they type
Number rangeNumbersA low and a high value on a slider
ToggleAny fieldOn keeps rows with one value, off keeps all
Top NGroupingsThe top groups by a measure

In the inspector:

  • Reaches sets This page or Every page. Only these elements narrows it further.

  • A control also reaches elements over other datasets, by field name. A control on region filters every element in scope whose dataset has a region field, and skips the rest.

  • Choices follow makes one control depend on another, such as a country before its cities.

  • Starts with is the value readers begin on, and they can change it.

  • Most values listed caps a select's list, 500 by default. Past it, typing searches the dataset.

Date ranges

Date controls offer the presets you pick under Presets, in the order you pick them. Last N days, weeks and months are always offered.

The picker readers get, and the dates a preset means today.

Presets are worked out each time in the report's time zone. Last N days ends yesterday, last N weeks or months ends with the last whole week or month, a "to date" range runs through today, and fiscal presets follow your organization's fiscal year. See Dates and time zones.

Report and page filters

These are conditions you set that readers don't get a control for. With nothing selected, add one under Report filters, which reach every page, or Page filters, which reach this page and add to the report's. Each reaches every element whose dataset has the field.

Cross-filtering

Clicking a mark on a chart filters the other elements on the page by what was clicked. It's on by default. Turn it off for one chart with Clicking filters the page, in its Interactions section. Charts with no one value behind a mark, such as scatter plots, Gantt charts, gauges and point maps, turn that off themselves.

What a reader changes shows above the page, each with a way back. Filtered by names what they clicked, Clear filters lets go of them all, and Reset returns the report to how you left it.

To open another page instead, set Clicking opens to a page. That's drill-through: the page opens filtered by the clicked values, and Back returns. Exploring a chart further is in Exploring charts.

Parameters

A parameter is a value readers set that isn't a filter on a field, such as a growth target. Formulas read it as @name:

SUM([Revenue]) * (1 + @growth_target)
  1. With nothing selected, press + beside Parameters. Set its Name in formulas, Label and Type, then what it starts at.

  2. Choose Add, then Parameter control, to put it on a page. Sets picks the parameter and Looks like picks the control.

  3. On the dataset, give a parameter the same name and use @name in a calculated field. The report's value takes its place, and without one the dataset's default applies.

TypeValuesFormulas get
NumberA number, with optional lowest, highest, step and choicesThe number
TextText, with optional choicesThe text
On or offTrue or falseThe value
DateOne dayThe day
Date rangeA range of days@name_start and @name_end, as dates
List of valuesSeveral values from a listThe picked values, joined by commas

Text can show a parameter's value in a sentence too. See Text, images and live values.

Locked filters

A locked filter is one a reader can't change or get around. Halo adds it on the server to every query that reaches its dataset, so it holds even for someone calling the API. There are two kinds.

  • On the report or page. Turn on Lock on a report or page filter. It applies to public links, embeds, and PDFs and snapshots made from the published report.

  • In a signed token. Your server puts filters in a signed embed's token. A control on a field the token locks shows its value with a lock instead of a picker, and locked filters no control shows are listed above the report.

If the report and a token both name a field, both apply, so a row has to pass both. A token can only narrow what the report allows.

Members signed in to Halo Data aren't limited by locked filters, only by their access and row policies. To vary what each person can read, use a row policy: a locked filter is the same for everyone on the link.

What a locked filter reaches

The filter says under its name which it does:

It saysIt limits
Only and a dataset's nameThat dataset
Every dataset with the fieldEach dataset with that field. A dataset without the field isn't limited by it

A page's locked filter limits the datasets drawn on that page, and a query doesn't say which page it's for. So that dataset can't be used on any other page.

When it can't be enforced

Halo won't publish a locked filter that wouldn't hold, and requesting approval or scheduling refuses the same way. The Publish dialog says Couldn't publish and which filter it is:

It saysWhat to do
The locked filter on "…" on page "…" can't be enforced, because its dataset is also used outside that pageLock it on the report instead, or keep that dataset to this page
Its locked filter on "…" matches no field in the datasets it can reach, so it wouldn't limit anythingUnlock it, or filter on a field they have

If a dataset later loses the field, so that the filter fits nothing left in the report, the link stops showing data rather than showing too much, and readers see "This report can't be shown right now." Unlock the filter or fix the field, and the link works again.

On a report with editions, a filter's preset dates read as of the period's last day. Turning on Edition readers see only the published figures stops readers changing filters at all.

Keep and share what you set

In Halo Data, a reader's filters and choices live in the page's address. The report's views menu has Save this view…, which only you see, Manage views… to bring a saved view up to date, rename it or delete it, and Copy link to this view, which opens the report filtered the same way for anyone with access to it. Name in links on a control sets how it reads in that address.

A public link keeps a reader's filters in its address too, so its Copy link shares the report as it looks. See Send a filtered view. An embed's host page can set filters with the element's filter API.