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

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

Reply
PhillipRothwell
Frequent Visitor

Use CSV column as custom parameter

Hi I'm exploring the use of API to extract data for use in Power BI. Take the following as a particular call

 

https://mrurl.com/api/coursecode/33795/analytics/activity

s

I have a CSV containing a list of course codes similar to the one below

 

course_code

64726

43447

63794

29471

63803

 

What I'm aiming to do is loop through all values in that csv and inject these as a custom parameter into the above api request using  M in the custom query view. The resulting request would look like something below

 

https://mrurl.com/api/coursecode/{course_coderow1}/analytics/activity

https://mrurl.com/api/coursecode/{course_coderow2}/analytics/activity

https://mrurl.com/api/coursecode/{course_coderow3}/analytics/activity...... etc etc

 

Does anyone know the best way to approach this?

 

Thanks in advance 🙂

 

Phil

1 REPLY 1
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @PhillipRothwell ,

 

As Imkef suggested here, you should firstly load the CSV file into desktop as a query, that holds all the variables/parameter and add a custom column to it where you make your API call, thereby referencing the column(s) with your variables where needed. That will return a colum with all the values from the different rows of your table that you can simply expand. 

 

Best regards,

Yuliana Gu

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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 Solution Authors