ItemExpression.From is a Power Query M function that returns the abstract syntax tree (AST) for the body of a 1-argument lambda function. The function returns an item expression AST or raises an error if the AST cannot be returned.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
ItemExpression.From( function as function ) as record
Description
Returns the abstract syntax tree (AST) for the body of function, normalized into an item expression:
- The function must be a 1-argument lambda.
- All references to the function parameter are replaced with
ItemExpression.Item. - The AST will be simplified to contain only nodes of the kinds:
ConstantInvocationUnaryBinaryIfFieldAccess
function.
Examples
Returns the AST for the body of the function each _ <> null
ItemExpression.From( each _ <> null )
/* Output:
[
Kind = "Binary",
Operator = "NotEquals",
Left = ItemExpression.Item,
Right =
[
Kind = "Constant",
Value = null
]
]
*/
Related functions
Other functions related to ItemExpression.From are:
2023-2026 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy