Error.Record
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
Returns a record containing fields “Reason”, “Message”, and “Detail” set to the provided values. The record can be used to raise or throw an error.
Error.Record(reason as text, message as text, detail as any) as record
| Argument | Description |
|---|---|
| reason | The value to set the Reason as. |
| message | The value to set the Message as. |
| detail | The value to set the Detail as. |
error Error.Record("InvalidCondition","An error has occured", null)
equals error with Reason: “InvalidCondition” and Message “An error has occurred”
Show: