Forum Discussion
papi0506
2 years agoFrequent Visitor
Perform function on list of items in m code
Hello, I'm looking for the basic structure for how to take a single column from a table or list and run a function with each item in the list as parameters or variable in the function. I read a p...
ImkeF
2 years agoCommunity Champion
Hi papi0506 ,
if you add a column to a table using the UI, a simple and easy loop will be performed, as every action that you define will be applied to every row of the table. No need to use List.Generate here, this function is only required if you need some recursive features.
So if you add a column with the following code, it should work in Power BI Desktop:
Json.Document(Web.Contents(Text.Combine("https://api/statistics/devices/id/" , [AccountId] )))
papi0506
2 years agoFrequent Visitor
Thank you for your response, but I may not be following this properly. When I try with just the line you provided it presents an error and wants the text of the url as a list?