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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors