Query string parameter syntax for filtering
With parameters, you can filter the report for one or more values, even if those values contain spaces or special characters. The basic syntax is fairly straightforward; start with the report URL, add a question mark, and then add your filter syntax.
URL?filter=Table/Field eq ‘value‘
- Table and Field names are case-sensitive, value isn’t.
- Fields that are hidden from report view can still be filtered.
Reports in apps
If you want to add a URL filter to a report in an app, the formatting is a little different. Links to reports in an app have a query parameter (ctid) that gets added to the URL. Separate the query parameters with an ampersand (&). Keep “?filter=” and move the ctid parameter to the end of the URL, preceded by an ampersand (&).
Like this example:
app.powerbi.com/groups/me/apps/app-id/reports/report-id/ReportSection?filter=Table/Field eq ‘value&’ctid=ctid
Field types
Field type can be a number, datetime, or string and the type used must match the type set in the dataset. For example, specifying a table column of type “string” won’t work if you’re looking for a datetime or numeric value in a dataset column set as a date, such as Table/StringColumn eq 1.
- Strings must be enclosed with single quotes – ‘manager name’.
- Numbers require no special formatting
- Dates and times must be enclosed with single quotes. In OData v3 they must be preceded by the word datetime, but datetime isn’t needed in OData v4.
Examples:
?filter=Table01/OrgId eq 10
?filter=Table01/Organization eq 'Abc'
?filter=Table01~2FOrganization%20eq%20%27Abc%27
Source
https://docs.microsoft.com/en-us/power-bi/service-url-filters
Comments