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

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.

Reply
elijah2018
Helper I
Helper I

Pass query/list parameter to function

Hi everyone, 

 

I needed to import data from the web where it was just the ending of the URL that was changed. 

So I read and implemented on how to create a function where I could pass the ending of the URL to the function as a parameter. 

The function had the following structure: 

(DataItem as text) =>
let
source = Csv.Document(Web.Contents("www.mydatabase.com/" & DataItem), [everyting else....]) 

in 
source

 

 So the problem that I have is that there is a small box below the function description where I can type in a string that is passe to the function, but what I would like is that instead of having to type in a string all the time I want to be able to select DataItem from a specified list parameter och a query parameter. 
But I dont know how to specify to the function that the parameter should be a query or a pre-specified list. 

 

Thank you in advance for your help 

Best regards 

Elijah

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @elijah2018,

 

You could check the similar examples in below links:

Dynamic connection to Web URL

Passing a parameter to a URL

 

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.
Stachu
Community Champion
Community Champion

it's explaind in this article
https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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