Forum Discussion
Anonymous
3 years agoNot applicable
Power Query - get column name
Hello, I have different files containing various attributes (one file will have Job Name, another one will have Location, another one will have Grade, etc.). Sample Data: Job Name C...
AlexisOlson
3 years agoSuper User
This doesn't work well with just a single input parameter. Try writing where you pass in the record too.
(R as record, MyColumn as text) as text =>
let
Text = Record.Field(R, MyColumn),
TextLen = Number.ToText(Text.Length(Text)),
FinalText = MyColumn & " " & TextLen
in
FinalText
If the name of the function is fn_Len, then you can invoke it as a new custom column like this:
fn_Len(_, "Job Name")