Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I'm making API calls to a call tracking service called ResponseTap. Their API allows you to return a list of many call IDs (e.g. clarity-us4-1459508541.810585), but with no further details such as call duration, source, etc. In a different type of call, I'm able to return full call details, but only for a single call ID. I would like to pull full call details (like the second API call) but for multiple call IDs (like the first API call).
API Call 1 (multiple call IDs, no details)
let Source = Xml.Tables(Web.Contents("https://dashboard.responsetap.com/api/1/accounts/5482/cdrids?fromDate=2016-04-01&toDate=2016-04-05")), Table0 = Source{0}[Table], Table1 = Table0{0}[Table], #"Changed Type" = Table.TransformColumnTypes(Table1,{{"Element:Text", type text}}) in #"Changed Type"
API Call 2 (single call ID, full details)
let Source = Xml.Tables(Web.Contents("https://dashboard.responsetap.com/api/1/accounts/5482/fullCallRecords/clarity-us4-1459508541.810585")), #"Changed Type" = Table.TransformColumnTypes(Source,{{"cdrId", type text}, {"customerNumber", Int64.Type}, {"trackingNumber", Int64.Type}, {"businessNumber", Int64.Type}, {"campaignName", type text}, {"callDate", type datetime}, {"callDuration", Int64.Type}, {"callTalkTime", Int64.Type}, {"disposition", type text}, {"recorded", type logical}, {"sourceId", Int64.Type}, {"channelName", type text}, {"mediumName", type text}, {"mediumTypeName", type text}, {"numberGroupId", Int64.Type}, {"numberGroupName", type text}, {"callId", Int64.Type}}) in #"Changed Type"
How could I replace the call ID in the second API call (clarity-us4-1459508541.810585) with a variable that would pull in call IDs from the first API call and report full call details for all of them? Thanks!
Here is a similar scenario that should help you out.
http://datachix.com/2014/05/22/power-query-functions-some-scenarios/
Basically, the concept is to turn your API Call 2 into a function that takes one or more parameters and then you call API Call 2 function for each row in API Call 1.
In your case, you may have to create multiple functions and custom columns that call those functions, or return everything in a comma-separated return value and then do a split on that column as a subsequent step in your API Call 1 query.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
69 | |
57 | |
37 | |
36 |
User | Count |
---|---|
83 | |
67 | |
62 | |
46 | |
45 |