Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I have a Power BI report that I have created four parameters in. These are used to pass to an API call which is the data source.
I have not been able to work out how to call the Power BI report passing it values for these four parameters. Is there a way to do this? Please note that these are Power BI parameters and not filters.
Hi @Steve_I,
You can refer to below links about call api with power query:
Working with Web Services in Power Query
Regards,
Xiaoxin Sheng
Hello @v-shex-msft,
I am not sure that these solve my problem. I have a Power BI report that I have defined parameters in. I want to be able to sent the value of those parameters in a call to the report. Currently including from your link https://community.powerbi.com/t5/Desktop/Passing-a-parameter-to-a-URL/td-p/103363 I can only see that you can only change parameter values manually in Power BI desktop.
Hi @Steve_I,
>>I have a Power BI report that I have defined parameters in.
So you defined your parameter in report, such as use a measure or slicer, right?
If this is a case, current power bi not support to use these as the parameter.
Data Level:
datasource(database) -> Analysis Table(Power query/parameters) -> Data model(Calculate column/Table) -> Visual(Slicer/measure)
Slicer and measure are works on visual level, they can't effect the source data.(query parameter can affect the source table)
Regards,
Xiaoxin Sheng
@v-shex-msft, I created parameters using the Query Editor. I am passing these parameters to an API call in Power BI.
I want to be able to dynamically change the value for these parameters when calling Power BI report.
Hi @Steve_I,
I'd like to suggest you use another query as the parameter, then you can dynamic change it by modify the source data of the query.
For e.g:
Add a xml file and return the analysis the string, use it as the parameter to invoke your api.
<root> <RECORD> <FIELD ID="1" Text="Name"/> <FIELD ID="2" Text="Age"/> <FIELD ID="3" Text="Password"/> </RECORD> </root>
Then you can use above query name to call this analysed parameter.
BTW, parameters query only works on power bi desktop.
Regards,
Xiaoxin Sheng
HI @v-shex-msft, I already have the call to the API passing the parameters inside PowerBI.
What I need to know is can I call the PowerBI report, passing it values for the parameters, or can you only change the value of a parameter inside PowerBI?
Hi @Steve_I,
>>What I need to know is can I call the PowerBI report, passing it values for the parameters,
Current you can't pass the value form the report(for example: slicer, measure, calculae column) to power query function.
>>can you only change the value of a parameter inside PowerBI?
The method which I mentioned is dynamic change the parameter without manual "Edit parameter" in power bi.(The parameter is analysis by other source data, you can use it in your custom function. If you modify the source data and refresh, the analysis parameter will be changed)
Regards,
Xiaoxin Sheng
Hello again @v-shex-msft,
Thank you for your continued input. I have managed to use XML as the data soruce to bring in the value for Account, however how do I use this value in the call to the API? I can only see ot use text or a parameter to call the API.
Hi @Steve_I,
You can try to choose "Text" and input some text, then apply this function. After these steps, you can open "advanced editor", find out the inputted text and use analysis text from other query(e.g from xml) to replace this parameter.
Regards,
Xiaoxin Sheng
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.