Skip to content

Instantly share code, notes, and snippets.

@whitemx
Last active September 23, 2015 22:05
Show Gist options
  • Save whitemx/e9ce60e4aed73377b007 to your computer and use it in GitHub Desktop.
Save whitemx/e9ce60e4aed73377b007 to your computer and use it in GitHub Desktop.
//Written by Ken Puls, FCPA, FCMA, MS MVP (Excel)
//Original Source: http://www.excelguru.ca/blog/2014/11/26/building-a-parameter-table-for-power-query/
(ParameterName as text) =>
let
ParamSource = Excel.CurrentWorkbook(){[Name="Parameters"]}[Content],
ParamRow = Table.SelectRows(ParamSource, each ([Parameter] = ParameterName)),
Value=if Table.IsEmpty(ParamRow)=true
then null
else Record.Field(ParamRow{0},"Value")
in
Value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment