Why This Cheat Sheet?

Power Apps uses a formula language called Power Fx. It’s similar to Excel formulas, but designed for building apps.

Whether you’re a beginner or an experienced maker, you’ll find yourself constantly looking up syntax and parameters.

This cheat sheet organizes every important formula into categories so you can find what you need fast.

Bookmark this page — you’ll come back to it often! 🔖


How to Read This Cheat Sheet

Each table follows this format:

ColumnWhat It Means
FormulaThe function name
SyntaxHow to write it
ExampleA real-world usage
What It DoesPlain English explanation

Text Formulas

These formulas help you manipulate, format, and work with text strings.

FormulaSyntaxExampleWhat It Does
LenLen(Text)Len("Power Apps")10Returns the number of characters in a string
LeftLeft(Text, NumChars)Left("Power Apps", 5)"Power"Returns characters from the start of a string
RightRight(Text, NumChars)Right("Power Apps", 4)"Apps"Returns characters from the end of a string
MidMid(Text, Start, Count)Mid("Power Apps", 7, 4)"Apps"Returns characters from the middle of a string
UpperUpper(Text)Upper("hello")"HELLO"Converts text to uppercase
LowerLower(Text)Lower("HELLO")"hello"Converts text to lowercase
ProperProper(Text)Proper("john doe")"John Doe"Capitalizes first letter of each word
TrimTrim(Text)Trim(" hello ")"hello"Removes leading and trailing spaces
SubstituteSubstitute(Text, Old, New)Substitute("2024-01-01", "-", "/")"2024/01/01"Replaces occurrences of a substring
ReplaceReplace(Text, Start, Count, New)Replace("Power Apps", 7, 4, "Fx")"Power Fx"Replaces characters by position
ConcatenateConcatenate(Text1, Text2, ...)Concatenate("Hello", " ", "World")"Hello World"Joins multiple strings together
& (Ampersand)Text1 & Text2"Hello" & " " & "World""Hello World"Shorthand for Concatenate
TextText(Value, Format)Text(Today(), "mm/dd/yyyy")"02/21/2026"Converts a value to formatted text
ValueValue(Text)Value("42")42Converts a text string to a number
FindFind(FindText, WithinText, Start)Find("App", "Power Apps")7Returns the position of a substring (case-sensitive)
StartsWithStartsWith(Text, Start)StartsWith("Power Apps", "Power")trueChecks if text begins with a value
EndsWithEndsWith(Text, End)EndsWith("Power Apps", "Apps")trueChecks if text ends with a value
IsBlankIsBlank(Value)IsBlank(TextInput1.Text)true/falseChecks if a value is blank or empty
CoalesceCoalesce(Value1, Value2, ...)Coalesce(User.Email, "N/A") → first non-blankReturns the first non-blank value
SplitSplit(Text, Separator)Split("a,b,c", ",") → table with a, b, cSplits a string into a table of substrings
CharChar(Number)Char(10) → line breakReturns the character for an ASCII code
EncodeUrlEncodeUrl(Text)EncodeUrl("hello world")"hello%20world"URL-encodes a string
PlainTextPlainText(HTMLText)PlainText("<b>Bold</b>")"Bold"Strips HTML tags from text

Number & Math Formulas

Formulas for calculations, rounding, and number operations.

FormulaSyntaxExampleWhat It Does
SumSum(Table, Column)Sum(Orders, Amount)5000Adds up all values in a column
AverageAverage(Table, Column)Average(Orders, Amount)250Calculates the mean of values
MinMin(Table, Column)Min(Orders, Amount)10Returns the smallest value
MaxMax(Table, Column)Max(Orders, Amount)1000Returns the largest value
CountCount(Table, Column)Count(Orders, Amount)20Counts cells that contain numbers
CountRowsCountRows(Table)CountRows(Orders)20Counts the number of rows in a table
CountIfCountIf(Table, Condition)CountIf(Orders, Status = "Active")12Counts rows that meet a condition
RoundRound(Number, Decimals)Round(3.456, 2)3.46Rounds to a specified number of decimals
RoundUpRoundUp(Number, Decimals)RoundUp(3.451, 2)3.46Always rounds up
RoundDownRoundDown(Number, Decimals)RoundDown(3.459, 2)3.45Always rounds down
IntInt(Number)Int(3.9)3Rounds down to the nearest integer
AbsAbs(Number)Abs(-42)42Returns the absolute value
ModMod(Number, Divisor)Mod(10, 3)1Returns the remainder of division
PowerPower(Base, Exponent)Power(2, 3)8Raises a number to a power
SqrtSqrt(Number)Sqrt(16)4Returns the square root
RandRand()Rand()0.7291...Returns a random number between 0 and 1
RandBetweenRandBetween(Min, Max)RandBetween(1, 100)47Returns a random integer in a range

Date & Time Formulas

Working with dates and times in Power Apps.

FormulaSyntaxExampleWhat It Does
TodayToday()Today()2/21/2026Returns today’s date (no time)
NowNow()Now()2/21/2026 3:45 PMReturns the current date and time
DateDate(Year, Month, Day)Date(2026, 12, 25)12/25/2026Creates a date from parts
TimeTime(Hour, Min, Sec, Ms)Time(14, 30, 0, 0)2:30 PMCreates a time from parts
DateValueDateValue(Text)DateValue("02/21/2026") → dateConverts a text string to a date
TimeValueTimeValue(Text)TimeValue("14:30") → timeConverts a text string to a time
DateTimeValueDateTimeValue(Text)DateTimeValue("2026-02-21 14:30") → datetimeConverts text to a datetime
YearYear(Date)Year(Today())2026Extracts the year from a date
MonthMonth(Date)Month(Today())2Extracts the month (1–12)
DayDay(Date)Day(Today())21Extracts the day of the month
HourHour(DateTime)Hour(Now())15Extracts the hour (0–23)
MinuteMinute(DateTime)Minute(Now())45Extracts the minute (0–59)
SecondSecond(DateTime)Second(Now())30Extracts the second (0–59)
WeekdayWeekday(Date, Start)Weekday(Today(), StartOfWeek.Monday)6Returns day of week as a number
DateAddDateAdd(Date, Amount, Units)DateAdd(Today(), 30, TimeUnit.Days) → date 30 days from nowAdds to a date
DateDiffDateDiff(Start, End, Units)DateDiff(StartDate, Today(), TimeUnit.Days)45Calculates difference between dates
EDateEDate(Date, Months)EDate(Today(), 3) → date 3 months laterAdds months to a date
EOMonthEOMonth(Date, Months)EOMonth(Today(), 0) → last day of current monthReturns end of month
IsTodayIsToday(Date)IsToday(ThisItem.DueDate)true/falseChecks if a date is today
CalendarCalendar.MonthsLong()Calendar.MonthsLong() → table of month namesReturns localized month names
ClockClock.AmPm()Clock.AmPm()["AM", "PM"]Returns localized AM/PM labels

Logic & Conditional Formulas

Formulas for decision-making and branching.

FormulaSyntaxExampleWhat It Does
IfIf(Condition, Then, Else)If(Score >= 90, "A", "B")"A"Returns a value based on a condition
If (nested)If(C1, R1, C2, R2, Default)If(Score >= 90, "A", Score >= 80, "B", "C")Multiple conditions in one If
SwitchSwitch(Value, Match1, Result1, ...)Switch(Status, "Active", Green, "Inactive", Red, Gray)Matches a value to multiple options
AndAnd(Cond1, Cond2)And(Age >= 18, HasLicense)true/falseReturns true if ALL conditions are true
OrOr(Cond1, Cond2)Or(Role = "Admin", Role = "Owner")true/falseReturns true if ANY condition is true
NotNot(Condition)Not(IsBlank(Email))true/falseReverses a boolean value
IsBlankIsBlank(Value)IsBlank(TextInput1.Text)true/falseChecks if a value is blank
IsEmptyIsEmpty(Table)IsEmpty(Filter(Orders, Status="Open"))true/falseChecks if a table has no rows
IsNumericIsNumeric(Text)IsNumeric("42")trueChecks if text represents a number
IsMatchIsMatch(Text, Pattern)IsMatch(Email, Match.Email)true/falseTests text against a regex pattern
IfErrorIfError(Value, Fallback)IfError(1/0, 0)0Returns fallback if an error occurs
IsErrorIsError(Value)IsError(Value("abc"))trueChecks if an expression results in error
CoalesceCoalesce(V1, V2, V3)Coalesce(Nickname, FirstName, "Unknown")Returns first non-blank value

Table & Record Formulas

These are the formulas you’ll use most often with galleries, data tables, and collections.

FormulaSyntaxExampleWhat It Does
FilterFilter(Table, Condition)Filter(Accounts, Status = "Active")Returns rows that match a condition
SearchSearch(Table, Text, Col1, Col2)Search(Accounts, txtSearch.Text, "Name", "Email")Searches multiple columns for text
LookUpLookUp(Table, Condition, Column)LookUp(Users, ID = 5, Name)"John"Returns a single value from a matching row
SortSort(Table, Column, Order)Sort(Accounts, Name, SortOrder.Ascending)Sorts a table by one column
SortByColumnsSortByColumns(Table, Col, Order)SortByColumns(Accounts, "name", SortOrder.Ascending)Sorts by column name as string
FirstNFirstN(Table, Count)FirstN(Sort(Accounts, Revenue, SortOrder.Descending), 10)Returns the first N rows
LastNLastN(Table, Count)LastN(Accounts, 5)Returns the last N rows
FirstFirst(Table)First(Accounts).Name"Contoso"Returns the first record
LastLast(Table)Last(Accounts).NameReturns the last record
CountRowsCountRows(Table)CountRows(Filter(Accounts, Status="Active"))42Counts rows in a table
AddColumnsAddColumns(Table, ColName, Formula)AddColumns(Orders, "Total", Qty * Price)Adds a calculated column
DropColumnsDropColumns(Table, Col1, Col2)DropColumns(Accounts, "InternalID", "Notes")Removes columns from a table
RenameColumnsRenameColumns(Table, Old, New)RenameColumns(Accounts, "cr_name", "AccountName")Renames a column
ShowColumnsShowColumns(Table, Col1, Col2)ShowColumns(Accounts, "Name", "Email")Keeps only specified columns
DistinctDistinct(Table, Column)Distinct(Accounts, Status)Returns unique values from a column
GroupByGroupBy(Table, Col, GroupName)GroupBy(Orders, "Category", "Items")Groups rows by a column
UngroupUngroup(Table, GroupCol)Ungroup(GroupedData, "Items")Flattens a grouped table
ConcatConcat(Table, Formula, Sep)Concat(SelectedItems, Name, ", ")"A, B, C"Joins column values into a string
ForAllForAll(Table, Formula)ForAll(colItems, Patch(Orders, Defaults(Orders), {Name: Name}))Loops through each row and runs a formula

Collection & Variable Formulas

Managing app state, collections, and variables.

FormulaSyntaxExampleWhat It Does
SetSet(VarName, Value)Set(varUserName, User().FullName)Sets a global variable
UpdateContextUpdateContext({Var: Value})UpdateContext({showPopup: true})Sets a screen-level (context) variable
ClearCollectClearCollect(Collection, Data)ClearCollect(colAccounts, Accounts)Clears and fills a collection
CollectCollect(Collection, Record)Collect(colCart, {Item: "Widget", Qty: 2})Adds records to a collection
ClearClear(Collection)Clear(colCart)Removes all records from a collection
RemoveRemove(Collection, Record)Remove(colCart, ThisItem)Removes a specific record
RemoveIfRemoveIf(Collection, Cond)RemoveIf(colCart, Qty = 0)Removes records matching a condition
UpdateUpdate(Collection, OldRec, NewRec)Update(colCart, ThisItem, {Item: "Widget", Qty: 5})Replaces an entire record
UpdateIfUpdateIf(Collection, Cond, Changes)UpdateIf(colCart, Item = "Widget", {Qty: 10})Updates records matching a condition
PatchPatch(DataSource, Record, Changes)Patch(Accounts, LookUp(Accounts, ID=1), {Status: "Active"})Creates or updates a record in a data source
DefaultsDefaults(DataSource)Patch(Accounts, Defaults(Accounts), {Name: "New"})Returns default values for a new record

Moving between screens and managing app flow.

FormulaSyntaxExampleWhat It Does
NavigateNavigate(Screen, Transition)Navigate(DetailScreen, ScreenTransition.Fade)Navigates to another screen
Navigate (context)Navigate(Screen, Trans, {Var: Val})Navigate(DetailScreen, ScreenTransition.None, {selectedID: ThisItem.ID})Navigates and passes context variables
BackBack()Back()Goes to the previous screen
LaunchLaunch(URL)Launch("https://google.com")Opens a URL in a new tab
Launch (target)Launch(URL, {}, Target)Launch("https://google.com", {}, LaunchTarget.New)Opens URL with target control
ExitExit()Exit()Closes the app
ParamParam(Name)Param("recordID")"12345"Gets a URL parameter passed to the app

Screen Transition Options

Use these with Navigate():

TransitionWhat It Looks Like
ScreenTransition.NoneInstant switch — no animation
ScreenTransition.FadeFades out old screen, fades in new
ScreenTransition.CoverNew screen slides in from the right
ScreenTransition.CoverRightNew screen slides in from the left
ScreenTransition.UnCoverOld screen slides out revealing new screen
ScreenTransition.UnCoverRightOld screen slides out to the right

User & Environment Formulas

Getting info about the current user and environment.

FormulaSyntaxExampleWhat It Does
UserUser()User().FullName"John Doe"Returns current user info
User().EmailUser().EmailUser().Email"john@contoso.com"Returns user’s email
User().ImageUser().ImageSet as Image property of an Image controlReturns user’s profile photo
ConnectionConnection.ConnectedIf(Connection.Connected, "Online", "Offline")Checks network status
Connection.MeteredConnection.MeteredConnection.Meteredtrue/falseChecks if on metered connection

Notification & Dialog Formulas

Showing messages and feedback to users.

FormulaSyntaxExampleWhat It Does
NotifyNotify(Message, Type)Notify("Saved!", NotificationType.Success)Shows a toast notification
Notify (timeout)Notify(Msg, Type, Timeout)Notify("Error!", NotificationType.Error, 5000)Notification with custom timeout (ms)

Notification Types

TypeWhat It Looks Like
NotificationType.Informationℹ️ Blue info bar
NotificationType.Success✅ Green success bar
NotificationType.Warning⚠️ Yellow warning bar
NotificationType.Error❌ Red error bar

Data Source Action Formulas

Reading and writing data to Dataverse, SharePoint, and other sources.

FormulaSyntaxExampleWhat It Does
Patch (create)Patch(Source, Defaults(Source), Record)Patch(Accounts, Defaults(Accounts), {Name: "Contoso"})Creates a new record
Patch (update)Patch(Source, ExistingRecord, Changes)Patch(Accounts, Gallery1.Selected, {Status: "Closed"})Updates an existing record
Patch (bulk)Patch(Source, CollectionOfChanges)Patch(Accounts, colUpdatedAccounts)Creates or updates multiple records at once
SubmitFormSubmitForm(FormName)SubmitForm(EditForm1)Submits a form (create or edit)
ResetFormResetForm(FormName)ResetForm(EditForm1)Resets a form to its default state
NewFormNewForm(FormName)NewForm(EditForm1)Switches form to create mode
EditFormEditForm(FormName)EditForm(EditForm1)Switches form to edit mode
ViewFormViewForm(FormName)ViewForm(EditForm1)Switches form to read-only mode
RemoveRemove(Source, Record)Remove(Accounts, Gallery1.Selected)Deletes a record from a data source
RefreshRefresh(Source)Refresh(Accounts)Reloads data from the source

JSON & Advanced Formulas

For integrations, Power Automate, and advanced scenarios.

FormulaSyntaxExampleWhat It Does
JSONJSON(Data, Format)JSON(colExport, JSONFormat.IndentFour)Converts a table/record to a JSON string
JSON (blob)JSON(Image, JSONFormat.IncludeBinaryData)JSON(Camera1.Photo, JSONFormat.IncludeBinaryData)Converts binary data to base64 JSON
HashTagsHashTags(Text)HashTags("Love #PowerApps and #LowCode") → tableExtracts hashtags from text
MatchMatch(Text, Pattern)Match("abc123", "(\d+)"){FullMatch: "123"}Matches a regex pattern
MatchAllMatchAll(Text, Pattern)MatchAll("a1b2c3", "\d") → table of digitsFinds all regex matches
IsMatchIsMatch(Text, Pattern)IsMatch("test@mail.com", Match.Email)trueTests if text matches a pattern
GUIDGUID()GUID()"a1b2c3d4-..."Generates a new unique identifier
TraceTrace(Message)Trace("Button clicked", TraceSeverity.Information)Logs a message for Monitor debugging
PDFPDF(Screen)Set(varPDF, PDF(Screen1))Generates a PDF of a screen
ReadNFCReadNFC()Set(varTag, ReadNFC())Reads an NFC tag (mobile only)

Common Regex Patterns for IsMatch

PatternWhat It MatchesExample
Match.EmailValid email addresses"user@domain.com"
Match.HyphenA hyphen character"-"
Match.CommaA comma","
Match.DigitA single digit (0–9)"7"
Match.OptionalDigitsZero or more digits"", "123"
Match.LetterA single letter"A"
Match.MultipleLettersOne or more letters"Hello"
Match.NonSpaceAny non-space character"x"
Match.SpaceA space character" "
Match.MultipleSpacesOne or more spaces" "
Match.LeftParenA left parenthesis"("
Match.RightParenA right parenthesis")"

Delegation-Safe Formulas

Not all formulas work with large Dataverse tables. Here’s what’s safe and what’s not.

FormulaDelegable to Dataverse?Notes
Filter✅ YesMost comparison operators are delegable
Search✅ YesOnly for single columns in some connectors
LookUp✅ YesDelegable with simple conditions
Sort✅ YesSingle column sort is delegable
SortByColumns✅ YesDelegable for Dataverse
StartsWith✅ YesDelegable for text columns
EndsWith❌ NoNot delegable — runs client-side
in (operator)⚠️ PartialDelegable for column in table, not text search
Sum / Min / Max / Avg✅ YesDelegable as aggregate functions
CountRows✅ YesDelegable for Dataverse
CountIf✅ YesDelegable with simple conditions
IsBlank✅ YesDelegable in filter conditions
Mid / Left / Right❌ NoNot delegable
Len❌ NoNot delegable
Trim / Upper / Lower❌ NoNot delegable
Find❌ NoNot delegable
Concat❌ NoNot delegable
ForAll❌ NoRuns client-side always
AddColumns❌ NoNot delegable
GroupBy❌ NoNot delegable
Distinct✅ YesDelegable for Dataverse

Rule of thumb: If you see a ⚠️ delegation warning (blue underline) in the formula bar, your query will only process up to 500 or 2,000 rows — not the full table.


Quick Copy-Paste Snippets

SortByColumns(
    Filter(
        Accounts,
        Status = drpStatus.Selected.Value,
        StartsWith(Name, txtSearch.Text)
    ),
    drpSortBy.Selected.Value,
    If(
        togSortOrder.Value,
        SortOrder.Descending,
        SortOrder.Ascending
    )
)

Patch a New Record from a Form

Patch(
    Accounts,
    Defaults(Accounts),
    {
        Name: txtName.Text,
        Email: txtEmail.Text,
        Status: drpStatus.Selected,
        StartDate: dpStartDate.SelectedDate
    }
);
Notify("Record created!", NotificationType.Success);
Back();

Show a Confirmation Before Delete

// Button OnSelect
UpdateContext({showDeleteConfirm: true});

// Confirm button OnSelect
Remove(Accounts, Gallery1.Selected);
UpdateContext({showDeleteConfirm: false});
Notify("Deleted!", NotificationType.Success);

// Cancel button OnSelect
UpdateContext({showDeleteConfirm: false});

Display Relative Time (“2 hours ago”)

With(
    {mins: DateDiff(ThisItem.CreatedOn, Now(), TimeUnit.Minutes)},
    If(
        mins < 1, "Just now",
        mins < 60, Text(mins) & " min ago",
        mins < 1440, Text(RoundDown(mins/60, 0)) & " hr ago",
        mins < 43200, Text(RoundDown(mins/1440, 0)) & " days ago",
        Text(ThisItem.CreatedOn, "mmm dd, yyyy")
    )
)

Get Current User’s Dataverse Record

// On App.OnStart
Set(
    varCurrentUser,
    LookUp(
        Users,
        'Primary Email' = User().Email
    )
);

Bookmark this page and come back whenever you need a formula. Happy building! 🚀