PQ Merge table- cant solve the error

sadath

Active Member
Joined
Oct 10, 2004
Messages
262
Office Version
  1. 365
Platform
  1. Windows
Hi
I am trying to merge table (two coloumn from source table to two column in lookup table), below error is getting

Formula.Firewall: Query 'SALESDATA' (step 'Merged Queries') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.

Source Table having
GL Month
D01 Jan
D01 Jan
D02 Feb
D02 Jan
(contain duplicate records)

Lookup table Has

GL Month Type
D01 Jan S
D01 Feb S
D02 Jan S
D02 Feb N
D03 Jan NC
so on...

where i may be going wrong...
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
The Formula.Firewall error is typical for a situation in which you use results from one query directly in another.
In other to prevent this error, you can first create your original queries separately (maybe with connection only) and then create a separate query in which you merge the date from the original queries.

So not: query B in which you merge data with results from query A.
But: query A, query B and then query C in which you merge A and B.
 
Upvote 0
let
Source = Folder.Files("G:\OPERATIONS\DSR\DSRDATA\SALES"),
#"Removed Columns" = Table.RemoveColumns(Source,{"Extension", "Date accessed", "Date modified", "Date created", "Attributes"}),
#"Added Custom" = Table.AddColumn(#"Removed Columns", "Custom", each GETSALE([Folder Path]&[Name])),
#"Removed Columns1" = Table.RemoveColumns(#"Added Custom",{"Content", "Name", "Folder Path"}),
#"Expanded Custom" = Table.ExpandTableColumn(#"Removed Columns1", "Custom", {"DATE", "GL", "SALES"}, {"DATE", "GL", "SALES"}),
#"Filtered Rows" = Table.SelectRows(#"Expanded Custom", each true),
#"Added Custom1" = Table.AddColumn(#"Filtered Rows", "Date", each Date.ToText([DATE], "MMM")),
#"Renamed Columns" = Table.RenameColumns(#"Added Custom1",{{"Date", "Month"}}),
#"Added Custom2" = Table.AddColumn(#"Renamed Columns", "Custom", each Text.Upper([Month])),
#"Removed Columns2" = Table.RemoveColumns(#"Added Custom2",{"Month"}),
#"Renamed Columns1" = Table.RenameColumns(#"Removed Columns2",{{"Custom", "Month"}}),
#"Merged Queries" = Table.NestedJoin(#"Renamed Columns1",{"GL", "Month"},SAMESTORE,{"GL", "Month"},"NewColumn",JoinKind.LeftOuter)
in
#"Merged Queries"

here is the code, till #"Renamed Columns1" it works. Getting error i Merge Queries.
 
Upvote 0

Forum statistics

Threads
1,214,627
Messages
6,120,610
Members
448,973
Latest member
ChristineC

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top