Power Fx function
CountIf — Power Fx function reference
Count rows matching a condition.
Syntax
powerfx
CountIf( Table, Condition1 [, Condition2, ... ] )
Examples
powerfx
CountIf(Tasks, Status = "Open")
→ A number
powerfx
CountIf(Tasks, Status = "Open", Priority = "High")
powerfx
lblCount.Text = CountIf(Orders, CustomerID = ThisItem.ID) & " orders"
Common mistakes & gotchas
- CountIf is delegable for simple comparisons on SharePoint/Dataverse/SQL, making it the preferred way to get an accurate count over a large table.
- Multiple conditions are ANDed together, same as Filter — wrap in Or() for OR logic instead.
Related Power Fx functions
From Filtering, search & sort