Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Trying to update a power bi embedded visual filter

I am trying to update filters on single visuals that are embedded, but I can't seem to make it work.   I embed my visuals like this:         let embedConfiguration = { ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

     

    We can Apply Visual level filters to every Visual. You can use updateFilters to set new filter to the Visual our Update the filters.
    Simply add this piece of code On the js for embedding in the display each Visual section or you use the variable visualName and apply filters later to the visual.

    await visualName.updateFilters(models.FiltersOperations.Replace, filtersArray);
    

    For reference: Visual level filters

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.