Need to filter an existing Power View report by a user’s location or restrict new reports to the current month? Filters in Power View can now be pinned and applied to an entire report. Pinned filters can also be specified in the URL when opening or creating a report - to get started open an existing report and add a new filter condition to the URL using the format

&rf=[Table Name].[Field Name] eq 'Value'

Multiple filters can be created by chaining together filter conditions. A report on Box Office performance could be filtered to just Comedies released in 2004 with a URL like

&rf=[Media].[Genre] eq 'Comedy'&rf=[Media].[Release Year] eq 2004

 

 

 

Data types

Filters can be specified on string, numeric, date and Boolean fields. Currently only ‘equals’ filter conditions are supported.

String

&rf=[City].[Name] eq 'Sydney'

Numeric

&rf=[Time].[Year] eq 2013

&rf=[Sale].[Price] eq 19.99

Date

&rf=[Sale].[Date] eq datetime'2013-02-25'

&rf=[Sale].[Date] eq datetime'2013-02-25T12:34'

&rf=[Sale].[Date] eq datetime'2013-02-25T12:34:17.0001'

Boolean

&rf=[Resource].[Active] eq true

Blank or null values

&rf=[Something].[Else] eq null

 

Escaping characters

Some web browsers handle URL parameters containing UTF-8 characters in funky ways. If passing non-ASCII values be safe and URL encode. Convert

&rf=[Region].[State Province] eq '河南'

Into

&rf=[Region].[State Province] eq '%E6%B2%B3%E5%8D%97'

Use double '' to escape quotes

&rf=[Region].[City Name] eq 'O''Fallon'

 

Existing filters

Filters added via the report URL will replace any existing pinned filters on the same field.