Diagnostics.Trace

Generates a trace message and returns a value if tracing is activated. The optional parameter "delayed" determines whether the evaluation of the value should be postponed until the message is traced. ...

Syntax

Diagnostics.Trace(traceLevel as number, message as anynonnull, value as any, optional delayed as nullable logical) as any

About

Generates a trace message and returns a value if tracing is activated. The optional parameter "delayed" determines whether the evaluation of the value should be postponed until the message is traced. The traceLevel parameter accepts one of the following values: Critical, Error, Warning, Information, and Verbose.

Explanation

Before calling the Text.From function, track the message and return the outcome. Utilize the following Power Query M function: Diagnostics.Trace(TraceLevel.Information, "TextValueFromNumber", () => Text.From(123), true) The output will be "123".