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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi,
New query user here. I have a table with one column as "start date", and the second column as "end date". I need to make JSON POST query using the two dates as parameters to be passed through in a JSON body. How do I make POST query for each row and combine all data in a single table?
I know how to make a single working query, but how do I loop through each row in advanced editor? I have done some research, but i couldn't find similar situations using more than one columns as parameters. My working query is like this:
let
url = " http://www.xxx.xxx/..... ",
headers=[#"accept"="application/json", #"Content-Type"="application/x-www-form-urlencoded"],
PostBody = [
user_id = "lasf3sd5423e1dsd2asdsdsdf",
startTime = DateTime.ToText("2022-03-01", "yyyy-MM-dd h:mm"),
endTime = DateTime.ToText(DateTime.LocalNow(), "yyyy-MM-dd h:mm")
],
response = Json.Document(Web.Contents(url,
[
Headers = headers,
Content = Text.ToBinary(Uri.BuildQueryString(PostBody))
]
)),
In
response
Thank you!
Hi @SJMC_LAB ,
This is the related document, you can view this content:
https://gorilla.bi/power-query/list-generate-api-calls/
https://community.powerbi.com/t5/Power-Query/Request-POST-with-Json-Body/td-p/1959792
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 42 | |
| 41 | |
| 21 | |
| 21 |
| User | Count |
|---|---|
| 150 | |
| 107 | |
| 64 | |
| 36 | |
| 36 |