Names an expression's result, scalar or table, so a later RETURN can use it. Variables make measures quicker, clearer and simpler to debug, and remove any need for EARLIER or EARLIEST.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains VAR in context, with comparison tables and the common traps.
Terms in this definition
- Scalar
A Git tool that began at Microsoft and tunes clones of huge repositories for speed. It replaces VFS for Git, and Microsoft Learn points to it, Git LFS or Azure Artifacts when a repository grows too big.
- Event
Table in Log Analytics where entries from Windows event logs are kept.
- RETURN
Comes after the VAR definitions in DAX and holds the expression whose value the formula gives back. While debugging, pointing it at one variable for a while is a useful trick.
- EARLIER
Within nested DAX row contexts, lets an inner calculation read a column as it stood in an outer pass; EARLIEST jumps to the outermost. Most people now use variables, which read more clearly.
Related terms
- Custom variables
Values you define once in a Declarative Automation Bundle, under
variables, and reuse anywhere as${var.<name>}. A variable can carry a fallback value, fetch an object's ID by lookup, or be declaredtype: complex, and everything is filled in when you deploy. - Substitutions
Placeholders in a bundle, such as
${bundle.name},${bundle.target}or${workspace.current_user.userName}, filled in from the bundle context when it is deployed. Your own variables are referenced as${var.<name>}.