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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
pedro3
New Member

Embed Power BI on React App with filters coming from inputs from the react application

Hey guys. I have a question about embedding a power bi on react application. I was able tosuccessfully embed some reports on my react application but I was wondering if I could have custom filters (like specific dates or data source) on my application and send them to powerBI so they can update the reports based on the filters I select on my react application. Is this possible? How would I go about doing this? Observation (I embedded the reports using powerbi-client-react)

1 REPLY 1
Anonymous
Not applicable

Hi @pedro3 ,

You can refer the following links to get it:

Embed PowerBI reports in React application

const report = powerbi.embed(reportContainer, embedConfiguration);
report.off("loaded");
report.on("loaded", function () {
const existingFilters = report.getFilters()
.then(function(response) {
const newFiltersArr = [...response, countryFilter];
report.setFilters(newFiltersArr);
});
});

How To Embed Microsoft Power BI Charts Into Your React Application

Embedded Report add filter to EmbedConfig

    var config = {
        type: 'report',
        tokenType: models.TokenType.Embed,
        accessToken: accessToken,
        embedUrl: embedUrl,
        id: embedReportId,
        permissions: models.Permissions.Read,
        filters: [filter1,filter2], //filter array here
        settings: {
            filterPaneEnabled: true,
            navContentPaneEnabled: false
           
        }
    };

Best Regards

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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