Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sarthakc
Regular Visitor

How to get the report / page level filter details in a custom visual code ?

I am trying  to fetch details of filters applied at page / report level in my custom visual TypeScript code .

Is it possible to do that ? If yes , How ?  

1 REPLY 1
Eric_Zhang
Employee
Employee


@sarthakc wrote:

I am trying  to fetch details of filters applied at page / report level in my custom visual TypeScript code .

Is it possible to do that ? If yes , How ?  


@sarthakc

The page/report level filters are for whole page/report, not for a specific visual, not to mention a custom visual. You can get the filters with Power BI Javascript API.

 

 report.on('loaded', event => { 
 
 console.log(report.getFilters()); //report level filters
 
 
 report.getPages()
 .then(pages => {
     console.log(report.page(pages[0].name).getFilters())  // page level filters
 });

For visual level filters, it is not implemented.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.