Power Fx Playground
Test Power Apps and Power Fx formulas instantly against JSON payloads. Validate Sum(), CountRows(), First(), Last(), and Average before you use them in production apps.
Power Fx Playground
Type a Power Fx-style expression, paste your JSON data, and evaluate the result in a safe, browser-based environment.
Examples: Sum(products, price), CountRows(products), First(products)
The top-level array is treated as products. You can also pass an object like { "products": [ ... ] }.
Result
View the evaluated output for your formula.
Run a formula to see the evaluated result here. The output will be pretty-printed JSON when possible.
Example formulas
Click an example to load it into the expression input.
Supported functions in this MVP playground:Sum, Average, CountRows, First, Last.
The products collection is resolved from your JSON input. Unsupported functions or invalid expressions will show a clear error message instead of throwing.
Test Power Apps formulas instantly
When you are designing screens, data cards, or custom logic in Power Apps, it is often faster to validate formulas with real JSON payloads outside the studio. This playground gives you a focused environment where you can experiment without touching live apps or environments.
Paste a small sample of your data, tweak a formula, and see how Power Fx-style expressions behave. Once you are happy with the result, copy the formula or output back into your app, Copilot prompt, or documentation.
What is Power Fx?
Power Fx is a low-code, Excel-inspired formula language used across the Microsoft Power Platform. It lets makers and developers express logic using familiar functions like Sum, Average, and CountRows instead of writing imperative code.
This playground is a lightweight approximation designed for learning and quick experiments. It focuses on a small, predictable subset of behavior rather than full Power Fx compatibility, so you can reason about the results with confidence.
Common Power Fx formulas
- Sum(products, price) – Sum all numeric price values in the products collection.
- Average(products, price) – Compute the average price across all products.
- CountRows(products) – Return the number of items in the products array.
- First(products) – Get the first item in the collection (or null if empty).
- Last(products) – Get the last item in the collection (or null if empty).
These formulas cover a surprising number of real-world scenarios, from pricing summaries to row counts and quick inspections of data sets. The playground helps you see exactly what they return for a given JSON payload.
Power Fx examples
Imagine you are modeling subscription tiers similar to the sample data in this playground. You might use Sum(products, price) to calculate the total monthly cost of all active plans, or Average(products, price) to understand your average price point.
You can also combine aggregation with filtering. For example, filter down to active products only and then compute an average, or look up a specific plan by name before wiring that formula into a Power Apps control. The playground lets you try these ideas safely before committing them to your app.
Power Fx vs Excel formulas
- Table-first: Power Fx works with tables and records (like the products collection), while Excel works with cell ranges.
- Named fields: Instead of column letters, you reference fields like price or name, which makes formulas more self-documenting.
- App context: Power Fx formulas can read from controls, data sources, and user actions at runtime, not just static cells.
If you are comfortable with Excel, most of the mental model transfers directly to Power Fx. This playground provides a gentle bridge by letting you test familiar patterns on JSON data.
FAQ
What is Power Fx?
Power Fx is a low-code formula language for the Microsoft Power Platform. It borrows concepts from Excel and makes it easy to express logic for canvas apps, automations, and more without writing imperative code.
How do you use Sum() in Power Fx?
Use Sum() with a table and a numeric field. For example, Sum(products, price) adds up all numeric price values across the products collection.
What is CountRows() in Power Apps?
CountRows() returns the number of records in a table. In this playground, CountRows(products) evaluates to the number of items in the products array from your JSON input.
Is this a full Power Fx engine?
No. This is an MVP evaluator focused on a handful of aggregation and collection functions. It is meant for learning and quick checks, not as a drop-in replacement for the full Power Fx runtime.
What JSON shapes are supported?
The playground treats the top-level JSON array as products by default. You can also pass an object with a products array property. Other shapes will return a readable error instead of throwing.
Related developer tools
Explore more CopilotHub utilities and directories to support your Power Apps and AI-assisted development workflow.
- Browse all native utilities in the Dev Tools section.
- Discover external JSON and API helpers in the Tools directory.