Forum Discussion
Power BI Embedded - 3rd party embedding - using Power BI parameters to prefilter
Hello,
We currently display reports using Power Bi embedding. Our users do not have O365 accounts.
We currently pre-filter data using an Embed Configuration and filtering by a column value in a table. Ref: https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details
Is there a way to pre-filter the report using Power BI Parameters? [Edit Queries; Manage Parameters] ( ref: https://www.mssqltips.com/sqlservertip/4475/using-parameters-in-power-bi/
Thank you
What we do now:
var basicFilter = {
target: {
table: """ + FilterTableName + @""",
column: """ + FilterColumnName + @"""
},
operator: ""In"",
values: [
""" + FilterColumnValue + @"""
]
};
I don’t believe this is possible.
Although there is an API which allows us to get and set the parameters, it acts against the Dataset. If we have a pbix that has data for multiple projects, updating the parameter will update it for the whole data-set - and the report for all projects would be affected.
The Power BI Embedded Configuration settings do not support query parameters: https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details I think it is because by the time the report is made available for display, the queries that use the parameters have already run.
Recommendation: concatenate multiple filter criteria to a single column and use the existing filtering mechanism.
1 Reply
- MbalcarekHelper I
I don’t believe this is possible.
Although there is an API which allows us to get and set the parameters, it acts against the Dataset. If we have a pbix that has data for multiple projects, updating the parameter will update it for the whole data-set - and the report for all projects would be affected.
The Power BI Embedded Configuration settings do not support query parameters: https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details I think it is because by the time the report is made available for display, the queries that use the parameters have already run.
Recommendation: concatenate multiple filter criteria to a single column and use the existing filtering mechanism.