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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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