Power Fx function
As — Power Fx function reference
Alias a record scope.
Syntax
powerfx
Source As AliasName
Examples
powerfx
ForAll(Orders As O, O.Amount * 1.1)
→ Avoids name clashes
powerfx
ForAll(Orders As Ord, LookUp(Customers As Cust, Cust.ID = Ord.CustomerID).Name)
powerfx
Filter(Products As P, CountRows(Filter(OrderLines As L, L.ProductID = P.ID)) > 0)
Common mistakes & gotchas
- Use As when nesting galleries or ForAll so inner and outer rows do not collide.
- Without As, a nested ForAll/Filter's inner ThisRecord/ThisItem shadows the outer one, making the outer row unreachable by name — As is the required fix whenever both rows are genuinely needed.
- The alias only applies within that specific function call's scope; it does not rename the data source globally or affect other formulas elsewhere in the app.
Related Power Fx functions
From Records & scope references