Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Community,
I was looking to rely on data coming from REST API using the "From Web" option in the Get Data menu.
It's something really useful and I really like the advanced option which allow you to add part to the selected URL.
Anyway, from what I see, you can just type the "additional URL part" and there's no way to change it via user interaction.
In the example, my REST API accepts a parameter (employee ID 23), but as far as I undertand, once the report loads data the first time, all my data will always be related just to ID 23 and there's no way for the final user to trigger a new request in order to get data from another ID.
Am I right, or am I just missing anything?
Thanks in advance.
Fabio
Solved! Go to Solution.
Hi @Panto ,
Do you want to use filters or slicers to set the value(s) for an query parameter? You can refer to the preview function: https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters.
Since it is a preview version, so it has many limitations and may not have good technical support.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi Dedmon,
this sounds something more like what I'm thinking of.
I will try it and let you know.
Thanks in advance.
Fabio
Hi @Panto ,
Do you want to use filters or slicers to set the value(s) for an query parameter? You can refer to the preview function: https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters.
Since it is a preview version, so it has many limitations and may not have good technical support.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @Panto ,
You can create a parameter first(I have will show the steps by my test api):
Then you can use parameter for getting data from web:
After publishing the report to the power bi service , you can change the parameter in :
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi Dedmon,
the solution I am looking for is soemthing that allows the final user of the report (may be someone with basic and non-admin profile) to dynamically change the value of that sepcific paremeter (can be more than one) only within the report published on PBI service.
So basically, he/she opens the report with a "default value" retrieved from the REST API, and then without anything else but the report itself, he/she has "something" to click on / interact with in order to change that parameter and retrieve new data.
Best
Fabio
Hi @Panto
As an alternative, you could load a value from (for example) an Excel file. This value would be the Student ID. But this method requires you to use Power Query in Excel rather than PBI.
Happy to show you how to do it if you want?
Regards
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Proud to be a Super User!
Hi @Panto
You can create a Parameter from the Manage Parameters icon in the PQ menu.
This will allow you to specify a parameter/value that can be added to the URL. As this parameter value is changed so the data returned by your Web request changes.
Here's a sample PBIX file demonstrating the procedure below.
For example click on Manage Parameters and then New Parameter
Fill in the details for the new parameter
After you click OK you will have a new parameter called StudentID listed under the queries on the left of the screen and you should see this
Now open your main query in the Advanced Editor, the source step should look something like this
Source = Web.BrowserContents("https://www.api.com/employee/")
Change it so it looks like this
Source = Web.BrowserContents("https://www.api.com/employee/"&Text.From(StudentID)),
Close the query and then click on the StudentID parameter query.
Change the value of the parameter, then click back on the main query. It should load the data associated with the Student ID you just entered as the parameter value.
Regards
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Proud to be a Super User!
Hi Philip,
thanks for your feedback.
I've already tried somethig similar and since I cannot download your sample pbix, let me add one additional info.
"After" Power BI Dekstop, what I need is something that once published on PBI service may allow the final user of the report to change the parameter several times.
Example: by default we can have an ID set to 1, but I need the final user to change the ID via interaction with the report, say first change happens because he/she selects ID=2 via parameter, and after that he/she selects ID = 4.
Do you think it's possible?
Thanks again.
Fabio
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |