Power Fx
What is Power Fx?
Power Fx is the low-code language behind much of Microsoft Power Platform. You write short formulas in a syntax that looks and behaves like Excel, and the platform works out when to run them. It is strongly typed, functional, and declarative, which sounds technical but mostly means the language catches mistakes early and keeps your logic close to the data it works on.
The name is newer than the idea. Power Fx started as the formula language inside canvas apps in Power Apps, and Microsoft has been pulling it out into a shared language used in more places across the platform. It is also open source.
If you have ever typed =SUM(A1:A10) in a spreadsheet, you already know the shape of it. In a canvas app you attach a formula to a property of a control instead of to a cell, and the result updates on its own when its inputs change.
How declarative formulas work
Most Power Fx is declarative. You describe what a value should be, not the steps to produce it. The Visible property of a button, for example, can hold a formula that is true only when a form is complete. You never write code that shows or hides the button; Power Apps recalculates the property whenever the inputs change, the same way a spreadsheet cell recalculates when a cell it points to changes.
Here a save button stays hidden until a status is chosen:
drpStatus.Selected.Value = "Ready for review"Declarative formulas are usually shorter than the equivalent hand-written code, but the logic can end up scattered across many properties. Clear control names and reusable components keep a larger app readable.
Records, tables and delegation
Power Fx works with plain values, records, and tables. A record is a set of named fields; a table is a list of records. Many functions take a table and return a new table or a single record, so filtering, sorting, and lookups read almost like sentences.
Because the editor knows the type of every field, it flags problems while you type, such as treating text as a date without converting it first. One idea deserves early attention: delegation. When a formula runs against a large external source, a delegable operation is handed to the source to run, while a non-delegable one works only on a small batch the app has already pulled down. That is why a delegation warning is more than a style note; an app that looks correct on a hundred test rows can return incomplete results on real volumes.
Actions and side effects
Power Fx also handles the imperative side of an app: the things that happen when someone taps a button. Behaviour properties such as OnSelect run functions like Patch, Collect, and Notify to write a record, build a collection, or show a message. The same language covers both calculated properties and user-triggered actions, so there is no second language to learn for the interactive parts.
Treat save errors on purpose. A success message straight after a write does not prove that every validation and connector call succeeded, so handle failures and tell the person what to try again.
Where you meet Power Fx
Power Fx began in canvas apps and now turns up in more of the platform. You can use it in Dataverse formula columns to calculate a value from other columns, in model-driven app commands, in Power Automate desktop flows, in Power Pages, and through the Power Platform command line. Recent additions include AI functions such as AISummarize and AIClassify, which call a model straight from a formula. The exact list of hosts changes as Microsoft extends the language, so check the current documentation before you design around a specific one.
Power Fx compared with Excel, SQL and general-purpose code
Power Fx and Excel
Power Fx borrows Excel's syntax and many of its functions, so the learning curve is gentle. The difference is what it drives: controls, records, tables, and external data sources, plus navigation and actions that a spreadsheet does not have.
Power Fx and SQL
SQL describes queries and changes against relational data. Power Fx also drives the interface and app state, and through delegation an expression can be translated into an operation the data source runs. It is not a replacement for modelling your data in SQL, though.
Power Fx and general-purpose languages
Languages such as JavaScript and C# give more control over structure, libraries, and execution. Power Fx trims most of that back so app makers can move quickly. For genuinely complex parts, a developer can build an API or code component that a formula then calls.
What to watch out for with Power Fx
Give controls, variables, and components names that say what they do, and avoid copying the same business rule into several screens. Rules that must always hold belong as close to the data or server logic as possible, not only in the app.
Test empty values, errors, slow connectors, and unexpected types. Check delegation on every formula that filters, sorts, or searches a large source. Keep formulas under source control as part of a wider application lifecycle approach, and test changes in the target environment rather than trusting that a formula that saved cleanly will behave the same on live data.