Forum Discussion
antalgu
Helper I
5 years agoExpression.Error: We cannot convert the value "Manual_inbound" to type Function.
I'm having this error: There is an unknown identifier. Did you use the [field] shorthand for a _[field] outside of an 'each' expression? I know this is an error that appears when you present a field...
Jimmy801
Community Champion
5 years agoHello antalgu
the error is in your Table.TransformColumns. This function nees a nested list with your columnname as string and a function. Both is missing. So to fix this your code should look like this
Table.TransformColumns(Table.SelectRows(_CanviTipoTrucada, each ([Campaña] = "Manual_inbound")),{{"DDI_Entrante",each "Manual_inbound"}}),
And by the way i would choose another aproach to change the content of you column "DDD_Entrante".
Instead of Transforming you table 3 times by applying a SelectRows-function each time and probably combine them afterwards again, i would suggest you to us a Table.ReplaceValue. This would look like this (not complete, just to give you an idea)
Table.ReplaceValue(_CanviTipoTrucada,each [#"DDI_Entrante"],each if each [Campaña] = "Manual_inbound" then "Manual_inbound" else if ........, Replacer.ReplaceText, {"DDI_Entrante})
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy