Forum Discussion
Expression.Evaluate(_, #shared) in PowerBI Service
- 7 years ago
- 7 years ago
Meanwhile you can use this workaround, if you're using many functions in your expression: https://www.thebiccountant.com/2018/05/17/automatically-create-function-record-for-expression-evaluate-in-power-bi-and-power-query/
..I know it's a pain ;)
Meanwhile you can use this workaround, if you're using many functions in your expression: https://www.thebiccountant.com/2018/05/17/automatically-create-function-record-for-expression-evaluate-in-power-bi-and-power-query/
..I know it's a pain ;)
Hi ImkeF,
thank you.
In the end, I've solved this problem with creating a list of all Text functions.
let
Shared = #shared,
TextFunctionNames = List.Select(Record.FieldNames(Shared), each Text.StartsWith(_, "Text.")),
Result = List.Transform(TextFunctionNames, each _ & " = " & _ & ",")
in
ResultThe list is stored in a utility group, the load is disabled and I just copy all the values of the list into a record. This record, let's call it "All text functions scope", is then used like: Expression.Evaluate("my expression", #"All text functions scope").