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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I am trying to do a POST request using the blank query editior. I need to include a body query within the source to specify the date in yyyy-mm-dd format. If I manually type the date i.e. 2022-05-22 then my query pulls data from the site. However, I am trying to make the query reference today's date, so that at any point in time I am referencing the latest data. Unfortunately the date is required in the body for this provider.
I am struggling to pull today's date, in the format, and pass it through to my URL. Below is the working query, where I specifiy the date manually. How do I make that date always be todays date?
let
body = "{""Dates"":""2022-05-22""}",
Source = Json.Document(Web.Contents("https://app.officevibe.com/api/v2/engagement", [Headers=[Authorization="Bearer fakeapikey123423424242424", #"Content-Type"="application/json"], Content = Text.ToBinary(body)]))
in
Source
Solved! Go to Solution.
For body use this
body = "{""Dates"":"&""""&Date.ToText(Date.From(DateTime.FixedLocalNow()),"yyyy-MM-dd")&""""&"}",
For body use this
body = "{""Dates"":"&""""&Date.ToText(Date.From(DateTime.FixedLocalNow()),"yyyy-MM-dd")&""""&"}",
Thank you very much Vijay. That worked a treat.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |