Forum Discussion
Power Query to CSV column order changes effects references to Power Query
Hi johnlockard
I tried to replicate your problem but it works fine on my side. The XLOOKUP does not change after a refresh.
But I have a suspect: Do you use the step "Promote Headers" in your query?
As you can see, for the second file, the header names from the CSV are not identical with the current "real" header names.
If you do use "Use First Row as Headers", this will change the headers to whatever comes from your CSV and your formula should work fine:
Martin_Weiss Below is my full list of Power Query Steps that produce the behavior. I tried an enhanced test that added renamed columns and I have not added complexity that reproduces the behavior I'm experiencing with the steps below.
- SergeiBaklanJul 21, 2022Diamond Contributor
You have 6 Rename Columns steps, what exactly you are doing here?
- johnlockardJul 21, 2022Copper ContributorThe steps that show as renamed columns are actually creating new columns by parsing out data from another column.
Table.RenameColumns(#"DB Type Delimiters",{{"Text Between Delimiters", "Type"}})- SergeiBaklanJul 21, 2022Diamond Contributor
That's better to have entire sample file. If reproduce steps from your initial post - all woks, no problems.