Forum Discussion
adam_cogswell
9 years agoRegular Visitor
JSON query based on another query
Hi, New to PowerBI, and having what is probably a simple problem but can't seem to get it figured. I am trying to load JSON data and I've got one query working like a charm, transformed into a ta...
- 9 years ago
Sorry I ommitted a "let". See below:
let function = (ID as text) => let Source = Json.Document(Web.Contents("https://api.provider.com/survey_results?survey_id=" & ID, [Headers=[Authorization="Bearer ACCESS_TOKEN", Allow="application/json", #"NGIN-API-VERSION"="0.1"]])) in Source in function
dkay84_PowerBI
9 years agoMicrosoft Employee
For your second table (SurveyResults), in your web call I'm assuming that the [ID] field is a column of id's in the first table?
You can convert your second query to a funciton which you then invoke (via Add Column) and it will read each [ID] value from the [ID] field and run the web call.
If this scenario sounds correct, I can give you more details on how to implement, although it is very simple and can be done almost entirely via the UI.