Power Fx function
With — Power Fx function reference
Name temporary values inline.
Syntax
powerfx
With( { Name1: Value1, Name2: Value2, ... }, Formula )Examples
powerfx
With({tax: 0.1}, total + total * tax)→ Computed value
powerfx
With({subtotal: Sum(colCart, Qty * Price)}, subtotal + subtotal * 0.08)powerfx
With({rec: LookUp(Staff, ID = locId)}, rec.Name & " – " & rec.Department)Common mistakes & gotchas
- With is a naming convenience scoped to the current formula only — the named values do not persist outside the call the way a Set()/UpdateContext variable would.
- It avoids re-evaluating an expensive sub-expression (a LookUp, a Sum) multiple times in the same formula — without With you would otherwise repeat that sub-expression for each use.
Related Power Fx functions
From Table shaping