Diagnostics.ActivityId
ExpressionReturns an opaque identifier for the currently-running evaluation.
Syntax
Diagnostics.ActivityId() as nullable textReturn Value
text — A text identifier for the current evaluation activity, or null if unavailable.
Remarks
Diagnostics.ActivityId returns an opaque text identifier for the currently-running evaluation. This identifier is generated internally by the Power Query engine and uniquely identifies a single evaluation session.
This is an internal/advanced function primarily useful for:
- Correlating log entries across diagnostic traces within a single query evaluation.
- Custom connector development where activity tracking is needed.
- Debugging complex evaluation scenarios by tagging trace output with the activity ID.
The function takes no parameters. It returns null if no activity ID is available in the current context.
Because this is an engine-level diagnostic identifier, its format is not guaranteed and should be treated as opaque — do not parse or rely on its structure.
Examples
Example 1: Retrieve the current activity ID
let
ActivityId = Diagnostics.ActivityId()
in
#table({"ActivityId"}, {{ActivityId}})Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks