I have a simple data transformation that I am doing to an Excel file that is saved on a network. The Get and Transform refreshes on my computer, but not on anyone else's computer. I have tried to find a solution online and it seems like the issue
is with privacy settings or a bug in PowerQuery itself. In the transformation, I source the file from a csv on the network, promote headers, update the data types for the columns, filter the columns based on a named range I have in the underlying
Excel file, and keep the first n number of rows where n is based on a named range I have in my underlying Excel file.
The error that comes up on other computers in the network is:
"Query 'Name of Query' (step 'AutoRemovedColumns1') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination."
Below is the M language in the Advanced Editor I see:
let
Source = Csv.Document(File.Contents(ForecastDirectory),[Delimiter=",", Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"DATETIME", type datetime}, {"AECO_FIXED_12", Int64.Type}, {"AECO_FIXED_13", Int64.Type}, {"AECO_FIXED_REV", Int64.Type}, {"JCPL_FIXED_12",
Int64.Type}, {"JCPL_FIXED_13", Int64.Type}, {"JCPL_FIXED_REV", Int64.Type}, {"APS_FIXED_12", Int64.Type}, {"APS_FIXED_13", Int64.Type}, {"APS_FIXED_REV", Int64.Type}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each Date.Month([DATETIME]) = ScheduleMonth),
#"Kept First Rows" = Table.FirstN(#"Filtered Rows",NumberOfHours)
in
#"Kept First Rows"
What is the reason that this works on my computer but not on others in the network? Is there a way to fix this?