cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resident Rockstar
Resident Rockstar

Formula.Firewall: (step 'Invoked Custom Function') references other queries

Thanks Advanced.

 

Dear community friends,

 

I have spend more then 10 days on this issue, but my badluck still working for solution.

Issue : 

       Formula.Firewall: Query 'Flow Main (2)' (step 'Invoked Custom Function') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.

 

Source : 

1. Tabular Cube [ Table1,Table2]

2. OLE BD function.

 

Pulling dta into OLE DB connection from Tabular cube with paramater to populate data.

 

Step 1:

  Createing dataset from Tabular with merging Table1 and Table2.

Step 2:

  Created function using OLE DB with paramater.

Step 3:

  Created refrence of the Step 1 and used Invoke function (Step 2 function) to get data.Here is the place am getting this error.

Formula.Firewall: Query 'Flow Main (2)' (step 'Invoked Custom Function') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.

 

Note :

   I can't ignore the privacy policy from settings.

 

@ImkeF @MattAllington 

5 REPLIES 5
Highlighted
Community Support
Community Support

Re: Formula.Firewall: (step 'Invoked Custom Function') references other queries

Hi @Baskar,

 

Based on my test, I can reproduce a similar error as yours. Clearly we cannot combine an external data source with another query. Please check the blog to solve your issue.

 

1.png

At first, I create a parameter that contains file path/name and let the source is equal to the parameter. Then the M code is like this.

 

let
    Source = Folder.Files(Parameter1),
    #"Invoke Custom Function1" = Table.AddColumn(Source, "Transform File from C (2)", each #"Transform File from C (2)"([Content])),
    #"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
    #"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File from C (2)"}),
    #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File from C (2)", Table.ColumnNames(#"Transform File from C (2)"(#"Sample File (2)"))),
    #"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Source.Name", type text}, {"ID", Int64.Type}, {"name", type text}}),
    #"Merged Queries" = Table.NestedJoin(#"Changed Type",{"name"},#"Transform Sample File from C",{"name"},"Transform Sample File from C",JoinKind.LeftOuter)
in
#"Merged Queries"

And based on the above blog, I take the steps and change the M code as below.

 

let
    Source = testlist,
    #"Invoke Custom Function1" = Table.AddColumn(Source, "Transform File from C (2)", each #"Transform File from C (2)"([Content])),
    #"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
    #"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File from C (2)"}),
    #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File from C (2)", Table.ColumnNames(#"Transform File from C (2)"(#"Sample File (2)"))),
    #"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Source.Name", type text}, {"ID", Int64.Type}, {"name", type text}}),
    #"Merged Queries" = Table.NestedJoin(#"Changed Type",{"name"},#"Transform Sample File from C",{"name"},"Transform Sample File from C",JoinKind.LeftOuter)
in
#"Merged Queries"

Then we can get the result without no issue. If you still get errors, please share your Power Query code here.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Highlighted
Resident Rockstar
Resident Rockstar

Re: Formula.Firewall: (step 'Invoked Custom Function') references other queries

Thanks for your response @v-frfei-msft.

 

Here i have to use invoke function to get data from OLE DB connection. It is PI source.

 

Highlighted
Resident Rockstar
Resident Rockstar

Re: Formula.Firewall: (step 'Invoked Custom Function') references other queries

@ImkeF Any input for this issue.

Highlighted
Super User III
Super User III

Re: Formula.Firewall: (step 'Invoked Custom Function') references other queries

Hi @Baskar,

I can only refer to the link that @v-frfei-msft has given as well: https://www.excelguru.ca/blog/2015/03/11/power-query-errors-please-rebuild-this-data-combination/

 

You have to re-structure your queries accordingly.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Highlighted
Resident Rockstar
Resident Rockstar

Re: Formula.Firewall: (step 'Invoked Custom Function') references other queries

Firewall Issue.GIF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

@ImkeF @v-frfei-msft i have followed the link but still am getting same error.

Here i have attached my flow diagram.

My source is SSAS.

1. CT_1 ans PI Tags are two different DAX code.

2. Mergeing this two dataset to create Merge1 step.

 

Here am trying to invokle my PI function.

 

@MarcelBeug can you please help me on this case

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors