Reference · Power Fx · Canvas apps

Power Apps Formula Reference

Every common Power Fx formula with syntax, parameters, copy-ready examples and maker tips. Search by name or by task.

Works with
  • Power Apps

215 formulas18 categoriesPress / to search

215 formulas

A

B

C

D

E

F

G

H

I

J

L

M

N

O

P

R

S

T

U

V

W

Y

Guide

How to use this reference

  1. Search or browse

    Type a name or a task. Narrow it down with the A–Z strip or a category.

  2. Open a card

    See the syntax, what each part means, real examples and the gotchas makers run into.

  3. Copy it in

    Copy the syntax or an example, paste it into the Power Apps formula bar, and rename the controls.

Index

Every formula, A–Z

Each one also has its own page that you can bookmark or share.

A

  • Abs · Returns a number without its sign, so negative values become positive.
  • Acceleration · Returns the device’s acceleration on the X, Y and Z axes.
  • Acos · Returns the arccosine of a number, in radians.
  • Acot · Returns the arccotangent of a number, in radians.
  • AddColumns · Returns a copy of a table with extra calculated columns. The source is unchanged.
  • AIClassify · Uses AI to sort text into one of the categories you provide.
  • AIExtract · Uses AI to pull specific details, such as phone numbers or names, out of text.
  • AIReply · Uses AI to draft a reply to a message.
  • AISentiment · Uses AI to detect whether text is positive, negative or neutral.
  • AISummarize · Uses AI to summarize text.
  • AITranslate · Uses AI to translate text into another language.
  • And · Returns true only when every argument is true. The && operator does the same.
  • App · Gives information about the running app, such as the active screen and its size.
  • As · Gives the current record a name, which helps in nested galleries and loops.
  • Asin · Returns the arcsine of a number, in radians.
  • Assert · In a Test Studio test, checks that a condition is true and fails the test if not.
  • AsType · Treats a polymorphic lookup as a record of a specific table so you can read its columns.
  • Atan · Returns the arctangent of a number, in radians.
  • Atan2 · Returns the angle, in radians, of an (x, y) coordinate from the origin.
  • Average · Returns the mean of a formula across a table, or of a list of numbers.

B

  • Back · Returns to the screen the user came from.
  • Blank · Returns a blank (null) value, for example to clear a column.
  • Boolean · Converts text, a number or a dynamic value to true or false.

C

  • Calendar · Returns month and weekday names for the user’s language.
  • Char · Returns the character for an ASCII code.
  • Choices · Returns the possible values of a choice or lookup column.
  • Clear · Removes every record from a collection.
  • ClearCollect · Empties a collection and then fills it with new records, in one step.
  • ClearData · Deletes data saved on the device with SaveData.
  • Clock · Returns the user’s clock settings, such as AM/PM labels and 24-hour format.
  • Coalesce · Returns the first argument that is not blank or an empty string.
  • Collect · Adds records to a collection or data source, creating the collection if needed.
  • Color · Built-in named colors, such as Color.Red or Color.SteelBlue, for any color property.
  • ColorFade · Makes a color brighter or darker by a percentage.
  • ColorValue · Converts a CSS color name or hex code into a color value.
  • Column · Returns the value of a property, by name, from a dynamic record such as parsed JSON.
  • ColumnNames · Returns the property names of a dynamic record, such as parsed JSON.
  • Compass · Returns the compass heading of the device, in degrees.
  • Concat · Runs a formula for every record in a table and joins the results into one string.
  • Concatenate · Joins text values into one string. The & operator does the same.
  • Concurrent · Runs several formulas at the same time instead of one after another.
  • Confirm · Shows a confirmation dialog and returns true if the user confirms.
  • Connection · Tells you whether the device is online and whether the connection is metered.
  • Copy · Copies text to the device’s clipboard.
  • Cos · Returns the cosine of an angle given in radians.
  • Cot · Returns the cotangent of an angle given in radians.
  • Count · Counts the records in a single-column table that contain a number.
  • CountA · Counts the records in a single-column table that are not blank.
  • CountIf · Counts the records in a table that meet a condition.
  • CountRows · Counts the records in a table.

D

  • DataSourceInfo · Returns information about a data source, such as permissions or a column’s display name.
  • Dataverse.Unmask · Requests the unmasked value of a secured Dataverse column for one record, if the user may see it.
  • Date · Builds a date from year, month and day numbers.
  • DateAdd · Adds a number of units such as days, months or hours to a date/time value.
  • DateDiff · Returns the difference between two date/time values in the units you choose.
  • DateTime · Builds a date/time value from year, month, day, hour, minute and second numbers.
  • DateTimeValue · Converts a date and time written as text into a date/time value.
  • DateValue · Converts a date written as text into a date value.
  • Day · Returns the day-of-month part of a date/time value, from 1 to 31.
  • Dec2Hex · Converts a number to hexadecimal text.
  • Defaults · Returns a record holding the default values of a data source. Used with Patch to create records.
  • Degrees · Converts radians to degrees.
  • Disable · Turns off a signal, such as Location, to save battery.
  • Distinct · Returns the unique values of a formula across a table.
  • Download · Downloads a file from a web address to the user’s device.
  • DropColumns · Returns a table with the columns you list removed.

E

  • EDate · Adds or subtracts months from a date, keeping the same day of the month where possible.
  • EditForm · Switches a form to Edit mode for the record in its Item property.
  • Enable · Turns on a signal, such as Location, that was turned off with Disable.
  • EncodeHTML · Escapes characters such as < and & so text can be shown safely in HTML.
  • EncodeUrl · Encodes special characters so text can be used safely inside a URL.
  • EndsWith · Checks whether a string ends with another string.
  • EOMonth · Returns the last day of a month, offset by a number of months from a date.
  • Error · Creates a custom error, or passes an existing error on.
  • Errors · Returns details about errors from previous changes to a data source.
  • exactin · Like in, but case-sensitive.
  • Exit · Closes the running app, and can also sign the user out.
  • Exp · Returns e (about 2.718) raised to a power.

F

  • Filter · Returns the records of a table that meet every condition you give.
  • Find · Returns the position where one string first appears inside another.
  • First · Returns the first record of a table.
  • FirstN · Returns the first N records of a table.
  • Float · Converts text to a floating-point number.
  • ForAll · Runs a formula for every record in a table and returns a table of the results.

G

  • GroupBy · Groups records that share column values into nested tables.
  • GUID · Creates a new GUID, or converts GUID text into a GUID value.

H

  • HashTags · Extracts the hashtags (#words) from text into a one-column table.
  • Hex2Dec · Converts hexadecimal text to a number.
  • Host · Gives information about where the app runs, such as the operating system and browser.
  • Hour · Returns the hour part of a date/time value, from 0 to 23.

I

  • If · Returns one result when a condition is true and another when it is false.
  • IfError · Returns a fallback value, or runs an action, when a formula produces an error.
  • in · Checks whether text appears inside other text, or a value appears in a table. Not case-sensitive.
  • Index · Returns the record at a position in a table, counting from 1.
  • Int · Rounds a number down to the nearest whole number.
  • IsBlank · Checks whether a value is blank. Empty text also counts as blank.
  • IsBlankOrError · Checks whether a value is blank or an error.
  • IsEmpty · Checks whether a table has no records.
  • IsError · Checks whether a value is an error.
  • IsMatch · Tests whether text matches a pattern or regular expression.
  • IsNumeric · Checks whether a value is a number or text that can be read as a number.
  • ISOWeekNum · Returns the ISO 8601 week number of a date (weeks start on Monday).
  • IsToday · Checks whether a date/time value falls on today in the user’s time zone.
  • IsType · Checks which table a polymorphic lookup (such as Owner) points to.

J

  • JSON · Turns a table, record or value into a JSON text string.

L

  • Language · Returns the user’s language tag, such as "en-US".
  • Last · Returns the last record of a table.
  • LastN · Returns the last N records of a table.
  • Launch · Opens a web page, an app or a link such as mailto: or tel:.
  • Left · Returns the first characters of a string.
  • Len · Returns the number of characters in a string.
  • Ln · Returns the natural logarithm (base e) of a number.
  • LoadData · Loads a collection that was saved on the device with SaveData.
  • Location · Returns the device’s GPS position: latitude, longitude and altitude.
  • Log · Returns the logarithm of a number in any base. Base 10 if omitted.
  • LookUp · Returns the first record that matches a condition, or one value from it.
  • Lower · Converts all letters in a string to lowercase.

M

  • Match · Finds the first match of a pattern or regular expression and returns its details.
  • MatchAll · Finds every match of a pattern or regular expression and returns them as a table.
  • Max · Returns the largest value from a table formula or a list of numbers.
  • Mid · Returns characters from the middle of a string, starting at a position.
  • Min · Returns the smallest value from a table formula or a list of numbers.
  • Minute · Returns the minute part of a date/time value, from 0 to 59.
  • Mod · Returns the remainder after dividing one number by another.
  • Month · Returns the month part of a date/time value, from 1 to 12.

N

  • Navigate · Moves to another screen, optionally with a transition and context variables.
  • NewForm · Switches a form to New mode so the user can create a record.
  • Not · Flips a Boolean value: true becomes false and false becomes true. Same as the ! operator.
  • Notify · Shows a banner message at the top of the app.
  • Now · Returns the current date and time in the user’s time zone.

O

  • Or · Returns true when at least one argument is true. The || operator does the same.

P

  • Param · Reads a parameter that was passed in the app’s launch URL.
  • Parent · Refers to the container, gallery or screen that holds the control.
  • ParseJSON · Reads JSON text into a dynamic value that you convert with Text, Value and similar functions.
  • Patch · Creates or updates a record in a data source, or merges records.
  • PDF · Captures a screen or container as a PDF file you can send to a flow or save.
  • Pi · Returns the number π (about 3.14159).
  • PlainText · Strips HTML and XML tags from a string, leaving only the text.
  • Power · Raises a number to a power. The ^ operator does the same.
  • Print · Opens the browser’s print dialog for the current screen.
  • Proper · Capitalizes the first letter of each word and lowercases the rest.

R

  • Radians · Converts degrees to radians.
  • Rand · Returns a random decimal number from 0 up to, but not including, 1.
  • RandBetween · Returns a random whole number between two numbers, inclusive.
  • ReadNFC · Reads a nearby NFC tag and returns its identifier and the records stored on it.
  • RecordInfo · Returns information about one record, such as whether the user can edit or delete it.
  • RecordOf · Gets the record type of a table type. Used inside Type().
  • Refresh · Reloads the records of a data source so the app shows the latest data.
  • Relate · Links two Dataverse records through a one-to-many or many-to-many relationship.
  • Remove · Deletes specific records from a data source or collection.
  • RemoveIf · Deletes every record that meets a condition.
  • RenameColumns · Returns a table with one or more columns renamed.
  • Replace · Replaces characters at a given position in a string.
  • RequestHide · Closes a customized SharePoint list form.
  • Reset · Returns an input control to its default value, discarding the user’s changes.
  • ResetForm · Discards unsaved changes in a form and restores its initial values.
  • Revert · Reloads records from a data source and clears their errors.
  • RGBA · Builds a color from red, green, blue and alpha (transparency) parts.
  • Right · Returns the last characters of a string.
  • Round · Rounds a number to a given number of decimal places.
  • RoundDown · Rounds a number down, toward zero, to a given number of decimal places.
  • RoundUp · Rounds a number up, away from zero, to a given number of decimal places.

S

  • SaveData · Saves a collection to the device so it can be loaded later, for example offline.
  • Search · Returns records where any of the listed text columns contains the search text.
  • Second · Returns the second part of a date/time value, from 0 to 59.
  • Select · Runs another control’s OnSelect formula as if the user had selected it.
  • Self · Refers to the control the formula belongs to.
  • Sequence · Generates a single-column table of sequential numbers.
  • Set · Sets a global variable that every screen in the app can read.
  • SetFocus · Moves keyboard focus to a specific input control.
  • SetProperty · In a Test Studio test, sets a control’s property as if a user changed it.
  • ShowColumns · Returns a table with only the columns you list.
  • ShowHostInfo · Shows a pop-up with host details, such as the offline sync status of a mobile app.
  • Shuffle · Returns a table with its records in random order.
  • Sin · Returns the sine of an angle given in radians.
  • Sort · Sorts a table by the result of a formula.
  • SortByColumns · Sorts a table by one or more columns, each with its own direction.
  • Split · Splits a string into a single-column table using a separator.
  • Sqrt · Returns the square root of a number.
  • StartsWith · Checks whether a string begins with another string.
  • StdevP · Returns the standard deviation of a formula across a table, or of a list of numbers.
  • SubmitForm · Validates a form and saves its changes to the data source.
  • Substitute · Replaces matching text inside a string with new text.
  • Sum · Adds up a formula across every record of a table, or adds a list of numbers.
  • Switch · Compares one value against a list of matches and returns the result for the first match.

T

  • Table · Creates a temporary table from records you write inline.
  • Tan · Returns the tangent of an angle given in radians.
  • Text · Converts a value to text and formats numbers and dates.
  • ThisItem · Refers to the current record inside a gallery or form.
  • ThisRecord · Refers to the current record inside ForAll, Filter, Sum and other record-scope functions.
  • Time · Builds a time value from hour, minute and second numbers.
  • TimeValue · Converts a time written as text into a time value.
  • TimeZoneOffset · Returns the difference, in minutes, between UTC and the user’s local time.
  • Today · Returns the current date with the time set to midnight.
  • Trace · Writes a message to Monitor, test results and Application Insights.
  • Trim · Removes spaces from both ends of a string and collapses repeated inner spaces.
  • TrimEnds · Removes spaces from the start and end of a string, leaving inner spaces alone.
  • Trunc · Removes the decimal part of a number, rounding toward zero.
  • Type · Defines a named type for records and tables, for ParseJSON and user-defined functions.

U

  • Ungroup · Flattens a grouped table back into individual records.
  • UniChar · Returns the character for a Unicode code point.
  • Unrelate · Removes the link between two related Dataverse records.
  • Update · Replaces a whole record in a data source with a new one.
  • UpdateContext · Sets one or more context variables that exist only on the current screen.
  • UpdateIf · Changes every record that meets a condition.
  • Upper · Converts all letters in a string to uppercase.
  • User · Returns details about the signed-in user, such as Email, FullName and Image.

V

  • Validate · Checks a value or a record against the data source’s rules before saving.
  • Value · Converts text to a number.
  • VarP · Returns the variance of a formula across a table, or of a list of numbers.
  • ViewForm · Switches a form to View mode so the record is read-only.

W

  • Weekday · Returns the day of the week as a number.
  • WeekNum · Returns the week number of a date. The week containing January 1 is week 1.
  • With · Gives names to values for use inside one formula, without creating variables.

Y

  • Year · Returns the year part of a date/time value.

Questions

FAQ

Which apps do these formulas work in?
Canvas apps in Power Apps. Many also work in other Power Fx hosts such as Copilot Studio and Dataverse formula columns, but check the official page for each host.
What does "delegable" mean?
A delegable formula is run by the data source itself, so it can work across all of your records. A non-delegable one only sees the first 500 records by default (up to 2,000 if you raise the limit in settings).
Why do some examples use names like txtSearch or colCart?
They follow a common naming convention: txt for text inputs, dd for dropdowns, col for collections and var for variables. Swap in your own control and data names.

Descriptions on this site are written independently and simplified for makers. Always check the linked Microsoft Learn page for the complete, current behavior.

↑ ↓ moveEnter open