Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ritesh24
New Member

Dynamic Data fetch trigger while changing the date range

I am working on a report for my organization. In this report, I am fetching data from our server using REST API.

let
AuthKey = "",
url = "https://weburl/api",
body = "{""from"":""03/07/2017"", ""to"":""03/07/2017""}",
Source = Json.Document(Web.Contents(url,
[
Headers = [#"Authorization"=AuthKey,
#"Content-Type"="application/json"],
Content=Text.ToBinary(body)
]
)),
txn= Source[txn],


But I want to associate/change "from" and "to" in the API call using a daterange for date filter of power BI. That means if I change the date in date range control, PowerBI will fetch the data and update the report.

 

 

mCjgM1n

 



How can I do this?

3 REPLIES 3
v-yulgu-msft
Employee
Employee

Hi @ritesh24,

 

Currently, it is not possible to pass selected values from slicer to Power Query so that the dataset loaded into desktop can be dynamically changed. Please be aware of that the values available in data view is fetched from Power Query.

 

Here is a similar thread for your reference: Passing json parameters to REST API data source

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yulgu-msft 
Is this stil the case? because we have the exact same problem

ritesh24
New Member

I am working on a report for my organization. In this report, I am fetching data from our server using REST API.

let
AuthKey = "",
url = "https://weburl/api",
body = "{""from"":""03/07/2017"", ""to"":""03/07/2017""}",
Source = Json.Document(Web.Contents(url,
[
Headers = [#"Authorization"=AuthKey,
#"Content-Type"="application/json"],
Content=Text.ToBinary(body)
]
)),
txn= Source[txn],


But I want to associate/change "from" and "to" in the API call using a daterange for date filter of power BI. That means if i chnage the date in date range control, PowerBI will fetch the data and update the report.

 

Date Range

How can I do this?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.