Forum Discussion
Embed power bi report with predefined parameters using C#
Hi ibarrau,
Thank you very much for your reply!!!
However, I'd like to modify certain filter values within my Power BI report so that they are applied when the report is being embedded.
var config = { type: 'report', id: reportId, embedUrl: embedUrl, accessToken: token, permissions: models.Permissions.All, tokenType: models.TokenType.Embed, viewMode: models.ViewMode.View, settings: { panes: { filters: { expanded: false, visible: true }, pageNavigation: { visible: false } } } };
I understand how to control the visibility and expansion of report filters. But what I'm wondering is, can we actually change the filter conditions themselves? For instance, if I want to set a filter like 'Age < 30,' how would I go about doing that within Power BI?
I'm not sure about the specific scenario, however you can explore the features of embedded and how they work at the playground: https://playground.powerbi.com/en-us/explore-features
When you click on an action you can check how it's done and if it's the action you were looking for.
I hope that helps,
- KaveeMendis3 years agoNew Member
Hi ibarrau,
Thank You for your response!!😊
I found a solution.
const advancedFilter = {
$schema: "http://powerbi.com/product/schema#advanced",
target: {
table: "Ethnicity",
column: "Ethnicity"
},
logicalOperator: "And",
conditions: [
{
operator: "Contains",
value: "Group C"
}
],