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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
pinkukumar
Frequent Visitor

facing error while dynamically passing a function (JobId) in URL (advance editor) in Dataset

I am facing below error while dynamically passing a function (JobId)  in URL (advance editor) in Dataset and getting below error-

pinkukumar_0-1714641702491.jpeg

 

While trying to change the Type as Anonymous, Seeing below in data source settings-

pinkukumar_1-1714641728098.jpeg

JobId function code written for generating dynamic JobId-

pinkukumar_2-1714641891679.png

 

Dataset code from advance editor-

pinkukumar_3-1714642001534.png

 

If I am using hardcoded value for JobId then It's working fine -

URL="https://XXX.XXX.com/api/v3/job/19cf1416-afe2-00d0-8f2d-897d3a75ac00/results?offset=0&limit=500"

Can someone please help on this?, Thanks in Advance.
@powerquery
@

4 REPLIES 4
pinkukumar
Frequent Visitor

Thanks @lbendlin . The Relative Path and Query options are working fine and It loads data for same. Below is the M-query code written for same. We are getting error while refreshing the preview.

let
URL="https://XXXXXX.XXXXXX.com/api/v3/job/",
headers=[Accept="application/json", #"Content-Type"="application/json", #"Authorization"="_dremio"&Token(), Method="GET"],
Source = Web.Contents(URL,[RelativePath=JobId()&"/results/",Headers=headers]),
response = Json.Document(Source),
#"Converted to Table" = Record.ToTable(response),
Value = #"Converted to Table"{2}[Value],
#"Converted to Table1" = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table1", "Column1", {"Testprocedure", "test_procedure_id", "Scopename", "ScopeId", "observation_title", "analytics_audit_procedures"}, {"Testprocedure", "test_procedure_id", "Scopename", "ScopeId", "observation_title", "analytics_audit_procedures"})
in
#"Expanded Column1"


But when I try to refresh preview, Getting below error-

pinkukumar_1-1714980179317.png

 

Also not able to apply the changes because of the above error.

pinkukumar
Frequent Visitor

I didn't find that the function as getting passed in URL in mentioned web-contents link-
Web.Contents - PowerQuery M | Microsoft Learn

It's not helpful.

please read the documentation again.  You need to use RelativePath and Query if you want to be able to refresh your data source from the Power BI Service.

lbendlin
Super User
Super User

Please use the RelativePath and Query options

 

Web.Contents - PowerQuery M | Microsoft Learn

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.