You can try to use filter when embedding in the Javascript API. Check the wiki.
const basicFilter: pbi.models.IBasicFilter = { $schema: "http://powerbi.com/product/schema#basic", target: { table: "Store", column: "Count" }, operator: "In", values: [1,2,3,4] }
By the way, there was a bug with the it, however I think the PG team has fixed it.