mattadams84
Board Regular
- Joined
- Oct 30, 2016
- Messages
- 54
I am trying to pull in a variable from an excel sheet to use in power query.
I am basically calling an API and use the following code (this works perfectly by the way)
What i want to be able to do is change the numerical value of
So in this case i want to change the number 10 and to get that number from a sheet in my workbook.
I have created a table on a worksheet and called the table GET_DATA. This is a one row table with the number contained in a column called "ID"
How can i change this number "10" currently hardcoded to be a variable?
I am basically calling an API and use the following code (this works perfectly by the way)
Power Query:
let
pagination = (Page as number)=>
let
Source = Json.Document(Web.Contents("https://api.my-data-api.com/todays-data?key=xxxxxxxx&date=" & Date.ToText(Date.AddDays(Date.From(DateTime.LocalNow()), 10), "YYYY-MM-DD")&"&page="&Number.ToText(Page))),
data = Source[data]
in
data
in
pagination
What i want to be able to do is change the numerical value of
Power Query:
Date.ToText(Date.AddDays(Date.From(DateTime.LocalNow()), 10),
So in this case i want to change the number 10 and to get that number from a sheet in my workbook.
I have created a table on a worksheet and called the table GET_DATA. This is a one row table with the number contained in a column called "ID"
How can i change this number "10" currently hardcoded to be a variable?