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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
SaurabhSk
New Member

Set slicers from react to power bi embedded

I am implementing the Powerbi embedded dashboard in my React application.
In my Powerbi Dashboard, I have plenty of slicer from which I am manipulating data and visuals. I want to set the slicers from the react component but not able to set the slicers..

 const slicer_filter =
    {
        state: {
            filters: [
                {
                    $schema:    ,
                    target: {
                        table: 'Query1',
                        column: 'dealer_id',
                    },
                    operator: 'In',
                    values: ["0102"],
                    filterType: models.FilterType.BasicFilter,
                },
            ],
        }
    };

Called this slicers in embed config.
 <PowerBIEmbed
                    embedConfig={{
                        type: supportType,
                        id: reportID,
                        embedUrl: embeddedURL,
                        accessToken: token.token,
                        tokenType: models.TokenType.Embed,
                        slicers: [slicer_filter],
}}
  cssClassName={
                        "Embed-container"
                    }

                    getEmbeddedComponent={(embeddedReport) => {
                        window.Report = embeddedReport;
                    }}
                />


Any help would be appreciated, Thanks
@powerbiembedded @PowerBI @Azure 
3 REPLIES 3
SaurabhSk
New Member

Hi @Anonymous

So basically I have gone thorugh this document plenty of time but if I want to update the slicers I am not getting any exact solution for this.

I even tried the same in Powerbi embed playground Power BI Playground - Developer Sandbox
Still not getting a good picture of this 

 

Anonymous
Not applicable

Hi @SaurabhSk,

I think you can take a look at the following document about handle events and invoke and modify the filters in these events:

How to handle events in a Power BI embedded analytics application | Microsoft Learn

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi @SaurabhSk,

I'd like to suggest you take a look at the following document about how to control the filter based on client api:

Use filters in a Power BI embedded analytics report | Microsoft Learn
Regards,
Xiaoxin Sheng

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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