Forum Discussion
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.
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
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.
- ImkeF8 years agoCommunity Champion
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.
- Baskar8 years agoResident Rockstar
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