Power BI Filters sort data and information based on selected criteria. You can select fields or values within fields and view only the information related to that.
When you run a Power BI report or the Power BI service, the filters panel is located on the right side of your screen. You can expand it by clicking on the right, and filters can be applied at different levels such as Visual level, Page-level and Report level. This can be achieved even in the report, which is embedded in the .NET application.
Types of Power BI Filters
There are three levels of filters.
- Report-level filters impacts data in the report and can be considered as universal filters and can be easily hidden as shown in the image below.
- Page-level filters are useful for creating pages that focus on subsets of data. They function within the context of the report-level filters, which means that a page-level filter cannot override a report-level filter. They also cannot be programmed to filter the data on other pages.
- Visual-level filters are used on a given visual. These are the most granular filters you can apply to your data, and they operate within the context of both the page-level and report-level filters. This is mainly used for securing the data. User will be able to see the data which is only related to him based on their login credentials.
Applying page level filters:
- If we apply the filters at page level. Those filters will affect only to the particular page. Other pages will not affect to other pages.
Logic for Applying the page level filters:
Applying Visual level filters:
- If we apply filters at visual level those filters will applicable only for the visual.
Logic for Applying the visual level filters:
For security purposes applying page level and visual level filters is required in the .NET application. In Power BI we can provide row-level security by creating roles. But, in .NET, we can provide security as shown in above code. When user logs into .NET application, the filters will be automatically applied at the page level or visual level based on user access (Example: if a user is related to the US, he can see only related to US Data that is passed as the page level filter). If the user wants to apply filters only specific to visual, they can go with the visual filters.
Filters do not behave the same way because they are not created the same way. How you create them influences how they react in the filter panel in editing mode. With the above information, you can easily work with filters in Power BI and apply filters on a report’s data. Power BI is an interactive tool, and it instantly reacts to the filters applied on a report and evolves accordingly.