Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jorisam_
New Member

Queries based on query

Hi everybody,

 

I'm new and i'm trying to use PowerBI for making a report.

I need your help.

 

I try to show statistics for each email campaign. These stats are avaible using an API.

The problem is : there is one API showing the list of the campaigns sent with their code.

Then I have to make a request base the code for obtaining the statistics of each campaign.

 

How can PowerBI do that automatically ?

I know how to show the list of campaigns but i don't know how to tell POwerBI that it has to lauch X queries base on a url/API ("wwwYYYY.com/API/CAMPAIGNNUMBER) where CAIMPAIGNNUMER is different for each row...

 

Thanks

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @jorisam_ 

Create a table with different CAMPAIGNNUMBER, if it is of number type, you could do like this in Advanced editor:

let
  source={1..100}
in
  source

then convert it into table.

Create a function with parameter like this thread:

https://community.powerbi.com/t5/Desktop/script-running-looping-URLs-and-get-data/td-p/135980

Then invoke the custom query(Add custom column->invoke custom function) into the first table you created.

 

If you have any problem, feel free to let us know.


Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@jorisam_ ,Not very clear

refer

https://www.biinsight.com/power-bi-desktop-query-parameters-part-1/

https://community.powerbi.com/t5/Desktop/parameterize-connection/m-p/205900#M90712

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Fowmy
Super User
Super User

@jorisam_ 

Not sure if you have a problem getting the data from the web source based on parameters.
https://docs.microsoft.com/en-us/power-query/power-query-query-parameters

Can you explain more about the issue you are facing?

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.