What is an error?
In Power Query’s M language, one of the fundamental building blocks is the expression, which is responsible for producing a value upon evaluation. When an error is encountered, it indicates that the evaluation of the expression failed and could not be completed successfully. Errors can have various causes, such as invalid identifiers or operations, incompatible data types, and more. Understanding, preventing, and effectively handling errors is crucial for creating queries that are more robust and reliable.
When evaluating an M expression, there are two possible outcomes:
- The production of a single value
This indicates that the evaluation process was successful, and the expression was able to generate a result.
let result = 1 / 0 in result
Division by zero does not raise an error but returns infinity.
- Raising an error
When an error is raised, it indicates that the evaluation of an expression failed to...