I am making an Embed class that uses PowerBI Javascript. I am already filtering reports dinamically using a schema of a basic filter and an advanced filter.
In my page, I will also want to embed a dashboard or a single/multiple tiles. I want this dashboard or tiles to be filtered using the same schemas that I use in report. I searched around and saw that there's no way of direct filtering a dashboard or a tile using the schema Filters the same way I use in the report.
If this doesnt work, my best solution to embed tiles that are already filtered with custom filters, will be to use Visuals and instead of having dashboards or tiles I should use the Visuals of a report and this way I can use custom filters directly applied on them.
But is there another way around into filtering dashboard or tiles?
I can do this in a report. But is there any other way I can do this in a tile or a dashboard?
const basicFilter = {
$schema: "http://powerbi.com/product/schema#basic",
target: {
table: data.filter.table,
column: data.filter.column
},
operator: "In",
values: [data.filter.userId],
filterType: 1,
displaySettings: {
isLockedInViewMode: true,
isHiddenInViewMode: true,
displayName: "Logged in User"
}
//requireSingleSelection: true // Limits selection of values to one.
};
// Note, this is always an array!
config.filters = [basicFilter];