100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Low-Code

Power Fx Basics

Power Fx is the Excel-like, declarative formula language that powers every property, button, and calculation in a Power Apps canvas app.

Power Fx FormulasBeginner8 min readJul 10, 2026
Analogies

What Is Power Fx?

Power Fx is the formula language used throughout Power Apps canvas apps: every control property, from a label's Text to a gallery's Items to a button's OnSelect, is set with a Power Fx expression rather than imperative code in a separate file. It deliberately borrows Excel's syntax and function names (SUM, IF, FILTER read almost identically to their spreadsheet equivalents), so makers who already think in spreadsheet formulas can transfer that intuition directly, while still being expressive enough to build full business applications with data connections, variables, and navigation.

🏏

Cricket analogy: Power Fx's Excel-like syntax is like a batter who grew up playing gully cricket finding that the shot mechanics transfer almost directly to a proper turf-wicket match — same fundamentals, bigger stage.

Data Types and Values

Power Fx recognizes core scalar types — Text ("Hello"), Number (42, 3.14), Boolean (true/false), and Date/DateTime (Today(), Now()) — along with Color and GUID for specialized cases. Unlike a general-purpose programming language, Power Fx has no explicit variable type declarations; a value's type is inferred from context, and the language performs a limited amount of automatic coercion (for example, a numeric text string can often be used where a Number is expected), though relying on implicit coercion instead of explicit functions like Value() or Text() is a common source of subtle bugs.

🏏

Cricket analogy: Power Fx's inferred typing is like a scorer who writes '4' on the scorecard and everyone instantly knows from context whether that's a boundary, an over count, or a wicket-taker's cap number.

Records and Tables

A record is a single structured value written with curly braces, such as { Name: "Ava", Age: 30 }, conceptually equivalent to one row of an Excel table or one JSON object. A table is a collection of records with the same schema, written as Table({Name:"Ava"}, {Name:"Ben"}) or, for a single column, with square brackets like [1,2,3], and every gallery, data table, and dropdown in a canvas app is ultimately bound to a table. Because tables and records share the dot-notation used elsewhere in Power Fx (Gallery1.Selected.Name reads the Name field of the currently selected record), the same mental model applies whether the data comes from a static Table() call or a live connection to Dataverse or SharePoint.

🏏

Cricket analogy: A record is like one player's row on a scorecard (name, runs, balls faced), and a table is the full scorecard — every row sharing the same set of columns for every player.

Formulas Are Declarative

A Power Fx formula bound to a property is declarative, not procedural: you don't write step-by-step instructions that run once, you describe what the value should be at all times, and Power Apps automatically re-evaluates the formula whenever any input it depends on changes. Setting Label1.Text to Sum(Collection1, Amount) means that label will always show the current sum, recalculating live as records are added to or removed from Collection1, the same way an Excel cell containing =SUM(A1:A10) updates the moment any cell in that range changes, with no explicit 'refresh' step required.

🏏

Cricket analogy: Declarative recalculation is like a live run-rate display that automatically updates the instant a new ball is bowled, rather than a scorer having to manually recompute and re-announce it after every over.

powerfx
// Label showing a live count of open tasks
Label1.Text = "Open: " & CountRows(Filter(Tasks, Status = "Open"))

// Button visible only when a Dataverse record is selected in a gallery
SubmitButton.Visible = !IsBlank(Gallery1.Selected)

// A single-column table literal used to populate a dropdown
PriorityDropdown.Items = ["Low", "Medium", "High"]

// A record literal describing one new item
Set(varNewItem, { Title: "Draft proposal", DueDate: Today() + 7, IsDone: false })

Because Power Fx is the same language across canvas apps, formula columns in Dataverse, and Power Automate's Power Fx expressions, a formula you write once (like Filter(Orders, Status = "Pending")) reads the same way no matter which of those surfaces you're working in — the syntax knowledge transfers directly.

Operators and Function Categories

Power Fx uses & for string concatenation ("Hello " & "World"), + and - for arithmetic, and comparison operators (=, <>, <, >) that work across text, number, and date values. For membership testing, In performs a case-insensitive text search while Exactin is case-sensitive; for logic, And/Or/Not (or their symbol equivalents && / || / !) combine Boolean expressions. Functions themselves fall into recognizable families: table functions (Filter, Sort, Search, LookUp), aggregation (Sum, Average, CountRows), text (Concatenate, Left, Mid, Text), date (DateAdd, DateDiff, Today), and behavior functions like Patch, Navigate, and Notify that are only valid inside OnSelect-style behavior properties rather than in ordinary formula properties.

🏏

Cricket analogy: The In vs Exactin distinction is like a scorer accepting 'Kohli' or 'kohli' as the same batter in a loose search, versus an official records system that only matches the exact capitalization on the player's registered name.

Behavior functions like Patch, Collect, Navigate, Notify, and Reset can only be used inside behavior properties (OnSelect, OnChange, OnVisible, and similar), never inside a plain formula property like Text or Visible — putting Patch(...) inside a label's Text property will produce a compile error, since ordinary formula properties must be pure and side-effect-free.

  • Power Fx is the single, Excel-inspired formula language behind every canvas app property.
  • Core types are Text, Number, Boolean, and Date/DateTime, with type largely inferred from context.
  • Records ({Field: value}) are single rows; tables (Table(...), [ ]) are collections of records.
  • Formulas are declarative: they auto-recalculate whenever any dependency changes, with no manual refresh step.
  • & concatenates text; In is case-insensitive membership testing while Exactin is case-sensitive.
  • Functions group into table, aggregation, text, date, and behavior families.
  • Behavior functions (Patch, Navigate, Notify) only work inside behavior properties like OnSelect, not plain formulas.

Practice what you learned

Was this page helpful?

Topics covered

#LowCode#PowerAppsStudyNotes#MicrosoftTechnologies#PowerFxBasics#Power#Data#Types#Values#StudyNotes#SkillVeris