Is it possible to pass a value to a as filter so that the values on the report will change?
I have a function wherein I get numbers inputted by the user and when they enter, it should pass the value to and must change the values of the initial report
According to chatgpt i should do it like this:
<PowerBIEmbed
embedConfig={{
type: ‘report’,
id: ‘id’, // Replace with your report ID
embedUrl: ‘url’, // Replace with your report’s embed URL
tokenType: models.TokenType.Aad,
accessToken, // Replace with your access token
settings: {
panes: {
pageNavigation: {
visible: false
},
filters: {
expanded: false,
visible: false,
// Add your filter here
filters: [
{
$schema: “http://powerbi.com/product/schema#basic”,
target: {
table: “YourTableName”, // Replace with your table name
column: “columName” // Replace with your column name
},
operator: “In”,
values: [
“12345” // Replace with the value you want to filter by
]
}
]
}
}
}
}}
eventHandlers={
new Map([
[‘loaded’, function () { console.log(‘Report loaded’); }],
[‘rendered’, function () { console.log(‘Report rendered’); }]
])
}
cssClassName="Embed-container"
/>
but its not working because theres error that Ifilter does not contain filter something like that.
Samuel Allen L. Gelacio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.