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 ;)
Thank you, v-frfei-msft. I've voted for the idea.
- ImkeF7 years ago
Community Champion
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 ;)
- Nolock7 years ago
Resident Rockstar
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").