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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Terry2023
Frequent Visitor

How to reference a parameter in a new query

assistance with the follwoing would be appreciated.

 

I have created a date parameter which I wish to reference in the query

 

let
body = "{ ""dateRangeStart"": dateRangeStart, ""dateRangeEnd"": dateRangeEnd, ""detailedFilter"": { ""page"": ""1  ....... etc
in
Source

 

what do I need for these 2 to reference the parameters ?

 

 

Advanced editor.png

1 ACCEPTED SOLUTION
Terry2023
Frequent Visitor

SOLVED:

 

replaced entire Body string as a parametre rather than inserting multiple parameters into the string

 

let
body = Parameter
in
Source

View solution in original post

4 REPLIES 4
Terry2023
Frequent Visitor

SOLVED:

 

replaced entire Body string as a parametre rather than inserting multiple parameters into the string

 

let
body = Parameter
in
Source

Terry2023
Frequent Visitor

how to substitute 2 parametres?

 

let
dateRangeStart=dateRangeStart,
dateRangeEnd=dateRangeEnd,
body = "{ ""dateRangeStart"": ""2022-01-01T00:00:00.000"", ""dateRangeEnd"": ""2022-12-01T23:59:59.000"", ""detailedFilter"": { ""page"": ""1"", ""pageSize"": ""500"" } }", Source = Json.Document(Web.Contents("https://reports.api.clockufy.me/v1/workspaces/WORKSPACEID/reports/detailed", [ Headers = [#"Content-Type"="application/json"], Content=Text.ToBinary(body) ])),
timeentries = Source[timeentries],
#"Converted to Table" = Table.FromList(timeentries, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"_id", "description", "userId", "timeInterval" })
in
#"Expanded Column1"

Terry2023
Frequent Visitor

how to reference 2 parameters for a Source = Json.Document(Web.Contents

 

Terry2023_0-1677622728942.png

 

Terry2023
Frequent Visitor

fyi, i tried

= let
dateRangeStart=[dateRangeStart],
dateRangeEnd=[dateRangeEnd],
body = "{ ""dateRangeStart"": dateRangeStart, ""dateRangeEnd"": dateRangeEnd, ""detailedFilter"

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.