Currently the configuration to embed a specific visual through the JS powerbi-client does not allow passing in filters. See "Embed a report visual" for the configuration supported. Note that you are able to pass in filters at embed time for a report. See "Embed a report". Not being able to filter a visual at embed time results in 2 hops (once to load the visual with default filters, then another to load with expected filters).
Feature Request: I'd love for the feature to be added to filter at embed time for visuals like it exists for reports.
The way I do this now is hide the visual, embed it, set filters when loaded, then show it when rendered.
this.visualReady = false;
let visual = this.powerbi.embed(
embedElement,
visualLoadConfig
) as pbi.Visual;
visual.on('loaded', async () => {
await visual.setFilters([upcFilter, dateFilter]);
});
visual.on('rendered', async () => {
this.visualReady = true;
});
Are there any better ways to do this in the mean time?

