Skip to content

Power Fx Cheat Sheet

Look up the Power Fx functions you use most in Power Apps: the syntax, what each function does and a short example you can copy. Search by name or filter by category such as Logic, Text, Tables, Data and App.

Also known as: power fx functions, power apps formulas, power fx reference, power apps functions list, power fx examples.

58 functions

  • If

    Logic
    If(condition, then, [else])

    Returns one value when a condition is true and another when it is not.

    If(Score >= 50, "Pass", "Fail")
  • Switch

    Logic
    Switch(value, match, result, [default])

    Compares a value with several cases and returns the first match.

    Switch(Status, "New", Blue, "Done", Green, Gray)
  • And

    Logic
    And(condition1, condition2, [...])

    True only when every condition is true. Works like the && operator.

    And(Age >= 18, HasId)
  • Or

    Logic
    Or(condition1, condition2, [...])

    True when at least one condition is true. Works like the double pipe operator.

    Or(Role = "Admin", Role = "Owner")
  • Not

    Logic
    Not(value)

    Reverses true and false.

    Not(IsBlank(txtName.Text))
  • IsBlank

    Logic
    IsBlank(value)

    True when a value is blank or empty text.

    IsBlank(txtName.Text)
  • IsEmpty

    Logic
    IsEmpty(table)

    True when a table or collection has no rows.

    IsEmpty(colCart)
  • Coalesce

    Logic
    Coalesce(value1, value2, [...])

    Returns the first value that is not blank.

    Coalesce(txtNick.Text, "Guest")
  • IfError

    Logic
    IfError(value, fallback)

    Returns a fallback when the first formula produces an error.

    IfError(Value(txtQty.Text), 0)
  • With

    Logic
    With(record, formula)

    Names values once so a formula can reuse them.

    With({tax: 0.2}, Price * (1 + tax))
  • Text

    Text
    Text(value, [format])

    Converts a number or date to text with an optional format.

    Text(Today(), "dd mmm yyyy")
  • Concat

    Text
    Concat(table, formula, [separator])

    Joins the values from each row of a table into one text.

    Concat(colTags, Value, ", ")
  • Left

    Text
    Left(text, count)

    Takes characters from the start of a text.

    Left("PowerApps", 5)
  • Mid

    Text
    Mid(text, start, [count])

    Takes characters from the middle of a text.

    Mid("PowerApps", 6, 4)
  • Len

    Text
    Len(text)

    Counts the characters in a text.

    Len(txtName.Text)
  • Upper

    Text
    Upper(text)

    Converts text to upper case.

    Upper(txtCode.Text)
  • Substitute

    Text
    Substitute(text, old, new, [instance])

    Replaces matching text inside another text.

    Substitute(txtPhone.Text, " ", "")
  • Split

    Text
    Split(text, separator)

    Splits text into a one-column table.

    Split("a,b,c", ",")
  • Find

    Text
    Find(find, within, [start])

    Returns the position of some text, or blank if it is not found.

    Find("@", txtEmail.Text)
  • StartsWith

    Text
    StartsWith(text, start)

    True when a text begins with the given value.

    StartsWith(Title, txtSearch.Text)
  • IsMatch

    Text
    IsMatch(text, pattern, [options])

    Checks a text against a pattern or regular expression.

    IsMatch(txtEmail.Text, Match.Email)
  • Value

    Text
    Value(text, [language])

    Converts text to a number.

    Value("42.5")
  • Today

    Date & Time
    Today()

    Current date without a time.

    Today()
  • Now

    Date & Time
    Now()

    Current date and time.

    Now()
  • Date

    Date & Time
    Date(year, month, day)

    Builds a date from its parts.

    Date(2026, 12, 31)
  • DateAdd

    Date & Time
    DateAdd(date, number, [unit])

    Adds days, months or other units to a date.

    DateAdd(Today(), 7, TimeUnit.Days)
  • DateDiff

    Date & Time
    DateDiff(start, end, [unit])

    Counts the units between two dates.

    DateDiff(StartDate, EndDate, TimeUnit.Days)
  • EOMonth

    Date & Time
    EOMonth(date, months)

    Returns the last day of a month.

    EOMonth(Today(), 0)
  • Sum

    Math
    Sum(table, formula)

    Adds up a column or a list of numbers.

    Sum(colOrders, Amount)
  • Average

    Math
    Average(table, formula)

    Averages a column or a list of numbers.

    Average(colOrders, Amount)
  • Max

    Math
    Max(table, formula)

    Finds the largest value.

    Max(colOrders, Amount)
  • Round

    Math
    Round(number, digits)

    Rounds a number to the given number of decimals.

    Round(3.14159, 2)
  • Filter

    Tables
    Filter(table, condition, [...])

    Returns the rows that match every condition.

    Filter(Tasks, Status = "Open")
  • LookUp

    Tables
    LookUp(table, condition, [result])

    Finds the first row that matches a condition.

    LookUp(Users, ID = 5, Email)
  • Sort

    Tables
    Sort(table, formula, [order])

    Sorts a table by a formula.

    Sort(Tasks, DueDate, SortOrder.Ascending)
  • SortByColumns

    Tables
    SortByColumns(table, column, [order, ...])

    Sorts a table by one or more column names.

    SortByColumns(Tasks, "Priority", SortOrder.Descending)
  • FirstN

    Tables
    FirstN(table, [count])

    Returns the first rows of a table.

    FirstN(Tasks, 10)
  • CountRows

    Tables
    CountRows(table)

    Counts the rows in a table.

    CountRows(Filter(Tasks, Done))
  • Distinct

    Tables
    Distinct(table, formula)

    Returns the unique values of a column.

    Distinct(Tasks, Category)
  • AddColumns

    Tables
    AddColumns(table, name, formula, [...])

    Adds calculated columns to a table.

    AddColumns(Users, "Full", First & " " & Last)
  • GroupBy

    Tables
    GroupBy(table, column, [...], groupName)

    Groups rows by one or more columns.

    GroupBy(Tasks, "Owner", "Rows")
  • ForAll

    Tables
    ForAll(table, formula)

    Runs a formula for every row of a table.

    ForAll(colCart, Patch(Orders, Defaults(Orders), {Item: Item}))
  • Patch

    Data
    Patch(source, record, changes, [...])

    Creates or updates a record in a data source.

    Patch(Tasks, Defaults(Tasks), {Title: "New"})
  • Collect

    Data
    Collect(collection, item, [...])

    Adds records to a collection.

    Collect(colCart, {Item: "Pen", Qty: 2})
  • ClearCollect

    Data
    ClearCollect(collection, item, [...])

    Empties a collection, then fills it with new data.

    ClearCollect(colOpen, Filter(Tasks, Status = "Open"))
  • Clear

    Data
    Clear(collection)

    Removes all records from a collection.

    Clear(colCart)
  • RemoveIf

    Data
    RemoveIf(source, condition, [...])

    Deletes the records that match a condition.

    RemoveIf(colCart, Qty <= 0)
  • SaveData

    Data
    SaveData(collection, name)

    Saves a collection to the device storage.

    SaveData(colCart, "cart")
  • Set

    App
    Set(name, value)

    Sets a global variable.

    Set(gblUser, User().Email)
  • UpdateContext

    App
    UpdateContext({ name: value })

    Sets screen-level context variables.

    UpdateContext({locOpen: true})
  • Notify

    App
    Notify(message, [type], [timeout])

    Shows a banner message to the user.

    Notify("Saved", NotificationType.Success)
  • SubmitForm

    App
    SubmitForm(form)

    Saves the data in an edit form.

    SubmitForm(frmTask)
  • Concurrent

    App
    Concurrent(formula1, formula2, [...])

    Runs several formulas at the same time.

    Concurrent(ClearCollect(colA, A), ClearCollect(colB, B))
  • SetFocus

    App
    SetFocus(control)

    Moves keyboard focus to a control.

    SetFocus(txtName)
  • RGBA

    App
    RGBA(red, green, blue, alpha)

    Builds a color from its parts.

    RGBA(116, 39, 116, 1)
  • JSON

    App
    JSON(data, [format])

    Turns a table or record into JSON text.

    JSON(colCart, JSONFormat.IndentFour)
  • ParseJSON

    App
    ParseJSON(jsonText)

    Reads JSON text into an untyped object.

    ParseJSON(txtJson.Text)

Features

  • Search by function name or description
  • Filter by category
  • Copy an example with one click
  • Syntax and an example for every function

How to use the Power Fx Cheat Sheet

  1. Type a function name, or a word such as filter or date, into the search box.
  2. Pick a category to narrow the list.
  3. Read the syntax, then press Copy example and paste it into Power Apps Studio.

Examples

Validate a field before saving

If(IsBlank(txtName.Text),
  Notify("Name is required", NotificationType.Warning),
  SubmitForm(frmTask)
)

Frequently asked questions

Is this the full list of Power Fx functions?

No. It covers the functions most canvas app makers use every day. Microsoft documents the complete list.

Are Power Fx function names case-sensitive?

Yes. Write If, not if, and Filter, not filter. The formula checker on this site flags this mistake.

Related tools