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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
tiannie
Regular Visitor

Automating API link updates

I've been using PowerBI to directly import a web API to get up-to-date clinical trial information for my dashboard (from Clinicaltrials.gov, example link with 2 random studies here: clinicaltrials.gov/api/v2/studies?postFilter.ids=NCT07123961%7CNCT06868654&pageSize=400).

 

Previously if I wanted to add a new study, I'd just concaconate it to the link with %7C (for example, to add study NCT06354998 I just do clinicaltrials.gov/api/v2/studies?postFilter.ids=NCT06354998%7CNCT07123961%7CNCT06868654&pageSize=40...). 

 

Now I have a growing list of studies on an excel sheet that I want to add to this API, how do I do it without manually going into the advanced editor each time to add a new NCT number to the API link?

1 ACCEPTED SOLUTION
jaineshp
Memorable Member
Memorable Member

Hey @tiannie,

Based on your requirement to dynamically update the ClinicalTrials.gov API URL without manual intervention, here are the recommended approach:

 

Power Query List Processing

  • Load your Excel NCT list into Power Query Editor
  • Transform the NCT column into a list using Table.Column()
  • Use Text.Combine() function to join list items with "%7C" separator
  • Build the complete API URL string dynamically: "clinicaltrials.gov/api/v2/studies?postFilter.ids=" & [Combined_NCTs] & "&pageSize=400"
  • This approach ensures the URL rebuilds each time data refreshes

Fixed? ✓ Mark it • Share it • Help others!


Best Regards,
Jainesh Poojara | Power BI Developer

View solution in original post

2 REPLIES 2
jaineshp
Memorable Member
Memorable Member

Hey @tiannie,

Based on your requirement to dynamically update the ClinicalTrials.gov API URL without manual intervention, here are the recommended approach:

 

Power Query List Processing

  • Load your Excel NCT list into Power Query Editor
  • Transform the NCT column into a list using Table.Column()
  • Use Text.Combine() function to join list items with "%7C" separator
  • Build the complete API URL string dynamically: "clinicaltrials.gov/api/v2/studies?postFilter.ids=" & [Combined_NCTs] & "&pageSize=400"
  • This approach ensures the URL rebuilds each time data refreshes

Fixed? ✓ Mark it • Share it • Help others!


Best Regards,
Jainesh Poojara | Power BI Developer

Perfect, thanks Jainesh!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors