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
ppodgorski
Frequent Visitor

Invoked Custom Function references other queries or steps, so it may not directly access a data sour

Any assistance would be greatly appreciated.

 

My report refreshes fine and quick on Desktop but fails on Service with error: 

 

"Section1/TasksList2/Invoked Custom Function references other queries or steps, so it may not directly access a data source. Please rebuild this data combination"

 

The custom function I'm using calls an API that requires a "TASK ID" to be passed. Power BI executes this call for each row in the table.

 

The query TasksList2 is:

 

let
    Source = TasksList,
    #"Invoked Custom Function" = Table.AddColumn(Source, "Organisation", each #"Task Links"([TASK_ID_TEXT]))
in
    #"Invoked Custom Function"

The function "Task Links" is:

let
    Source = (TaskID as text) => let
        Source = Json.Document(Web.Contents(
            "https://api.insightly.com/v3.1/Tasks/",
            [
                RelativePath= TaskID & "/Links"
            ])),
        Custom1 = Table.FromRecords(Source),
        #"Filtered Rows1" = Table.SelectRows(Custom1, each [LINK_OBJECT_NAME] = "Organization")
    in
        #"Filtered Rows1"
in
    Source

 

I've already followed other advise on this forum to isolate the query "Tasks" into it's own query "TasksList2", and use the "RelativePath" parameter in the Web.Contents function instead of directly passing the TASKID parameter.

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @ppodgorski 

Here is a same post about it, you could refer to it:

https://community.powerbi.com/t5/Desktop/Formula-Firewall-Query-references-other-queries-so-it-may-n...

 

Best Regards,

Lin

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

I've already reviewed that post and used their suggestions. My error is slightly different (invoked function rather than query).

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors