cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Baskar
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
v-frfei-msft
Community Support
Community Support

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.

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.

 

Baskar
Resident Rockstar
Resident Rockstar

@ImkeF Any input for this issue.

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

Baskar
Resident Rockstar
Resident Rockstar

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
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors