Skip to main content
Low-Code Kit

Power Fx Formula Reference

Quick reference for Power Fx formulas in Power Apps — functions, operators, data types, and common patterns.

Last verified: 2026-03-29 power-fxformulaspower-appscanvas-appsreference

Data Types

TypeExampleNotes
Text"Hello"Double-quoted strings
Number42, 3.14Decimal numbers
Booleantrue, falseLogical values
DateDate(2026, 3, 29)Year, month, day
DateTimeDateTimeValue("2026-03-29T10:00:00")ISO 8601 format
Record{Name: "Dmitri", Age: 30}Key-value pairs
Table[{Name: "A"}, {Name: "B"}]Array of records
GUIDGUID("...")Unique identifier
BlankBlank()Null/empty value

Operators

OperatorExampleDescription
=A = BEquality (not assignment)
<>A <> BNot equal
<, >, <=, >=Age > 18Comparison
&"Hello" & " " & "World"Text concatenation
+, -, *, /Price * QtyArithmetic
And, Or, NotAnd(A, B) or A && BLogical
in"abc" in Text1Contains (text)
exactin"ABC" exactin Text1Case-sensitive contains
@[@Column]Disambiguation

Text Functions

FunctionExampleResult
Len(text)Len("Hello")5
Left(text, n)Left("Hello", 3)"Hel"
Right(text, n)Right("Hello", 2)"lo"
Mid(text, start, n)Mid("Hello", 2, 3)"ell"
Upper(text)Upper("hello")"HELLO"
Lower(text)Lower("HELLO")"hello"
Trim(text)Trim(" hi ")"hi"
Substitute(text, old, new)Substitute("abc", "b", "x")"axc"
Concatenate(a, b, ...)Concatenate("a", "b")"ab"
Text(value, format)Text(Now(), "dd/mm/yyyy")"29/03/2026"
Value(text)Value("42")42
Find(find, within)Find("lo", "Hello")4
StartsWith(text, start)StartsWith("Hello", "He")true
EndsWith(text, end)EndsWith("Hello", "lo")true
IsBlank(value)IsBlank("")true
Coalesce(a, b, ...)Coalesce(Blank(), "fallback")"fallback"

Number Functions

FunctionExampleResult
Round(number, digits)Round(3.456, 2)3.46
RoundUp(number, digits)RoundUp(3.451, 2)3.46
RoundDown(number, digits)RoundDown(3.459, 2)3.45
Abs(number)Abs(-5)5
Mod(number, divisor)Mod(10, 3)1
Power(base, exp)Power(2, 10)1024
Sqrt(number)Sqrt(16)4
Int(number)Int(3.9)3
Rand()Rand()0.0–1.0
RandBetween(low, high)RandBetween(1, 100)Random integer

Date & Time Functions

FunctionExampleDescription
Now()Now()Current date and time
Today()Today()Current date (no time)
Date(y, m, d)Date(2026, 3, 29)Construct a date
DateAdd(date, n, units)DateAdd(Today(), 7, TimeUnit.Days)Add to date
DateDiff(start, end, units)DateDiff(start, end, TimeUnit.Days)Difference
Year(date)Year(Today())Extract year
Month(date)Month(Today())Extract month (1-12)
Day(date)Day(Today())Extract day (1-31)
Hour(datetime)Hour(Now())Extract hour (0-23)
Weekday(date)Weekday(Today())Day of week (1=Sun)
Text(date, format)Text(Today(), "[$-en-GB]dd mmmm yyyy")Format date
DateTimeValue(text)DateTimeValue("2026-03-29T10:00:00")Parse ISO text
IsToday(date)IsToday(record.DueDate)Check if today

Table & Record Functions

FunctionDescriptionDelegable?
Filter(table, condition)Filter rows matching conditionYes (simple conditions)
Search(table, text, col)Full-text search on a columnYes (Dataverse)
Sort(table, col, order)Sort by columnYes (Dataverse)
SortByColumns(table, col, order)Sort by column name stringYes
LookUp(table, condition)Return first matching recordYes
First(table)First recordN/A
Last(table)Last recordN/A
FirstN(table, n)First N recordsN/A
CountRows(table)Number of rowsYes (Dataverse)
CountIf(table, condition)Count matching rowsNo
Sum(table, column)Sum of column valuesNo
Average(table, column)Average of column valuesNo
Max(table, column)Maximum valueNo
Min(table, column)Minimum valueNo
AddColumns(table, name, expr)Add computed columnN/A
DropColumns(table, col)Remove columnsN/A
RenameColumns(table, old, new)Rename columnsN/A
Distinct(table, column)Unique valuesNo
GroupBy(table, col, name)Group recordsNo
Ungroup(table, col)Flatten grouped tableNo
Collect(collection, record)Add to collectionN/A
ClearCollect(collection, table)Replace collectionN/A
Patch(datasource, record, changes)Create or update recordN/A
Remove(datasource, record)Delete recordN/A

Delegation Quick Reference

Functions that are delegable to Dataverse:

Filter, Search, Sort, SortByColumns, LookUp, CountRows,
=, <>, <, >, <=, >=, And, Or, Not, In, StartsWith

Functions that are NOT delegable (run locally, 500/2000 row limit):

CountIf, Sum, Average, Min, Max, Distinct, GroupBy,
AddColumns, DropColumns, Left, Right, Mid, Len, Lower,
Upper, Trim, Substitute, Find, IsBlank

Common Patterns

Conditional default value

If(IsBlank(TextInput1.Text), "Default value", TextInput1.Text)
Filter(
    Products,
    (Dropdown1.Selected.Value = "All" || Category = Dropdown1.Selected.Value)
    && (IsBlank(SearchBox.Text) || StartsWith(Title, SearchBox.Text))
)

Format currency

Text(Price, "[$-en-GB]£#,##0.00")
Navigate(DetailScreen, ScreenTransition.None, {SelectedItem: ThisItem})

Error handling with IfError

IfError(
    Patch(DataSource, Defaults(DataSource), {Title: "New"}),
    Notify("Save failed: " & FirstError.Message, NotificationType.Error),
    Notify("Saved successfully", NotificationType.Success)
)

Collect and process beyond delegation limit

ClearCollect(
    AllRecords,
    Filter(LargeDataSource, Status = "Active")
);
// Now operate on AllRecords locally (up to 2000 rows)
CountRows(Filter(AllRecords, Priority = "High"))

User’s display name and email

User().FullName
User().Email

Parse JSON (Power Fx)

Set(parsed, ParseJSON(jsonText));
Text(parsed.name)