Skip to content

Instantly share code, notes, and snippets.

@nsuvorov83
Created April 2, 2018 15:27
Show Gist options
  • Select an option

  • Save nsuvorov83/e9e657f37919f0f94cfb3e84e9665535 to your computer and use it in GitHub Desktop.

Select an option

Save nsuvorov83/e9e657f37919f0f94cfb3e84e9665535 to your computer and use it in GitHub Desktop.
PowerQuery renames all columns with answers except a column "Question" to range "AnswerN". Used to anonymise results of survey.
let
Source = Table1,
Transformed = Table.TransformColumnNames(Source, each if Text.Contains(_,"Question") then _ else Text.Replace(_, _, "Answer"))
in
Transformed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment