Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I want to pass custom parameters passed to power bi service e.g country=us,state=tx,product=notebooks.
https://app.powerbi.com/groups/me/reports/xxx/ReportSection?country=us,state=tx
I want data on the report to be displayed using these filters passed in parameters. SInce out of the box functionality is not similar to what I am looking for so I may adopt a solution where I can convert this string to something similar to Power BI format like
Product/Country eq 'US, Product/State eq 'TX'
Regards
Mudassar Hassan
Solved! Go to Solution.
Hi mudassarhassan,
You can use URL filter, please refer to: https://docs.microsoft.com/en-us/power-bi/service-url-filters.
Regards,
Jimmy Tao
To pass a parameter to a URL create it elsewhere and pass the following into the URL String:
"""&PARAMETER_NAME&"""
3 quotes, an ampersand and keep the parameter name to one word otherwise you have to deal with a space too!
@mudassarhassan Hi there ! hey were you able to achieve your scenario? please share suggestions or on how to. am also facing the same scenario.
Thanks!
Hi mudassarhassan ,
Are you trying to replace the part of string to query the data of power bi report in your three-party app? If you are, you can use regular expression to achieve this, suppose you are using javascript, you can write a string replacement operation like below:
var str = "Product/Country eq 'US, Product/State eq 'TX'"; var res = str.replace(/([^a-zA-Z])/g, "").replace(/[product]/g, "").replace(/[eq]/g, "=");
Regards,
Jimmy Tao
Actually I will be calling Power BI Report from web-api which can pass parameters as country=us,state=tx rather than what Power BI Understands. If we have such parameters how can i apply filters to the report data??
Hi mudassarhassan,
You can simply create some filters or slicers in your report. Then, suppose you are embedding your report into your website, just modify the embed configuration like below(set filterPaneEnabled as true):
var config= { type: 'report', tokenType: tokenType == '0' ? models.TokenType.Aad : models.TokenType.Embed, accessToken: txtAccessToken, embedUrl: txtEmbedUrl, id: txtEmbedReportId, permissions: permissions, settings: { filterPaneEnabled: true, navContentPaneEnabled: true } };
Regards,
Jimmy Tao
No Jimmy, that didn't work or fulfill my requirement
I want to filter the data in dashboard with country=usa, when someone tries to access the PowerBI Dashboard
https://app.powerbi.com/groups/me/reports/xxx/ReportSection?country=usa
Hi mudassarhassan,
You can use URL filter, please refer to: https://docs.microsoft.com/en-us/power-bi/service-url-filters.
Regards,
Jimmy Tao
User | Count |
---|---|
86 | |
84 | |
69 | |
67 | |
55 |
User | Count |
---|---|
125 | |
100 | |
90 | |
84 | |
66 |