Skip to main content Link Search Menu Expand Document (external link)

Filter a Power BI report passing parameters through URL

Power BI offers us a very sympathetic way to bring a bit more flexibility into our Reports. It’s not a brand-new feature, but I’m not sure that you know it!

You can display a report and automatically have a page filtered by the parameters you define in the URL.

Why is it cool?

But

  • It’s indeed not a way to add security to your reports!! (Filter can be removed by your users) => The Row-level security is what you need.
  • It’s not possible to use it in an iframe with a report “published to web”

First, Microsoft wrote already a nice article on this topic. I suggest you read it for more information.
https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters

How to

  • Open your report in Power BI Service and go to the page you want to filter
  • Click on the address bar and at the end of this line, add the following code ?filter=


This is the example used in this article. (You can also download this Power BI on this website. Search LazyDAX on the main page)

Filter on numeric value

?filter=Calendar/Year eq 2022

The first part of this expression refers to the dimension (Table) -> Calendar
The second part refers to the attribute name in this dimension -> Year
eq means equals

Filter multiple numeric values

?filter=Calendar/Year in (2022, 2023)

Filter on a text value

?filter=Product/ProductCategory eq 'Fruit'

Filter multiple Text values

Add Multiple filter on differents attributes

?filter=Customer/Country in ('Belgium', 'Nederland') and Product/ProductCategory eq 'Fruit' and Calendar/Year ge 2021

More operators are available


Source: Microsoft website (see url below)

Like mentioned at the beginning, everything is already well explained on the Microsoft website: https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters