Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

Power Apps Functions: The Complete List with Examples

Every Power Apps formula is built from functions. Need to show one record from a SharePoint list, add 30 days to a due date, or check whether a text input is empty before you save? There’s a function for it, and once you know the ones you’ll use every week, most canvas app problems get a lot smaller.

This page lists all 201 functions that Microsoft documents for canvas apps, grouped by what they do. Select a function name to open its full tutorial with the syntax, real examples built in a canvas app, and the mistakes to avoid. New function tutorials are added every day, so the list of links keeps growing.

Jump to a category

How to use a function in Power Apps

Quick steps: select a control (a label, button, or gallery), pick the property in the dropdown to the left of the formula bar (for example Text, Items, or OnSelect), type the formula in the formula bar, and select Play (or hold Alt and select a button) to test it.

Functions can be nested, so the result of one becomes the input of another. This formula on a label’s Text property shows a hint while the text input is empty and the trimmed, uppercase title once the user types:

If(IsBlank(txtTitle.Text), "Enter a title", Upper(Trim(txtTitle.Text)))

Text values go in double quotes, and you don’t start a formula with an equal sign. Functions that change something, such as Navigate, Patch, Set, and Notify, are behavior functions: they only work in behavior properties like a button’s OnSelect. To run several of them in a row, separate them with a semicolon.

Text functions

Text functions cut, search, join, and clean strings: the first few characters of a ticket number, a full name from two columns, or the hashtags in a comment. You’ll use them in labels, text inputs, and SharePoint text columns.

FunctionWhat it does
TextConverts any value and formats a number or date/time value to a string of text.
LeftReturns the left-most portion of a string.
MidReturns the middle portion of a string.
RightReturns the right-most portion of a string.
SubstituteReplaces part of a string with another string, by matching strings.
IsMatchChecks a string against a pattern. Regular expressions can be used.
MatchExtracts a substring based on a pattern. Regular expressions can be used.
MatchAllExtracts multiple substrings based on a pattern. Regular expressions can be used.
CharTranslates a character code into a string.
UniCharTranslates a Unicode code into a string.
TrimEndsRemoves extra spaces from the ends of a string of text only.
EncodeUrlEncodes special characters using URL encoding.
EncodeHTMLEncodes characters that need to be escaped to be used in an HTML context.
PlainTextRemoves HTML and XML tags from a string.
HashTagsExtracts the hashtags (#strings) from a string.
SplitSplits a text string into a table of substrings.
ReplaceReplaces part of a string with another string, by starting position of the string.
StartsWithChecks if a text string begins with another text string.
TrimRemoves extra spaces from the ends and interior of a string of text.
LowerConverts letters in a string of text to all lowercase.
FindChecks whether one string appears within another and returns the location.
LenReturns the length of a string.
ConcatenateConcatenates strings.
ConcatJoins a text value from every record of a table (or collection) into one string.
UpperConverts letters in a string of text to all uppercase.
ProperConverts the first letter of each word in a string to uppercase, and converts the rest to lowercase.
EndsWithChecks whether a text string ends with another text string.

Logical and information functions

Logical functions return true or false, or pick a value based on a condition. They drive the Visible, DisplayMode, and Fill properties, and they check whether a value is blank before you save it.

FunctionWhat it does
SwitchMatches with a set of values and then evaluates a corresponding formula.
CoalesceReplaces blank values while leaving non-blank values unchanged.
AndBoolean logic AND. Returns true if all arguments are true. You can also use the && operator.
OrBoolean logic OR. Returns true if any of its arguments are true. You can also use the || operator.
NotBoolean logic NOT. Returns true if its argument is false, and returns false if its argument is true. You can also use the ! operator.
BlankReturns a blank value you can use to insert a NULL value in a data source.
IsNumericChecks for a numeric value.
IfReturns one value if a condition is true and another value if not.
IsBlankChecks for a blank value.
IsEmptyChecks for an empty table.

Table functions (filter, sort, and shape data)

Table functions work on a data source, a collection, or a table you build in the formula. Filter, sort, and reshape rows for a gallery, or grab one record by position or condition. Watch the delegation notes in each tutorial. For a deeper guide, see Filter vs Search vs LookUp in Power Apps.

FunctionWhat it does
LookUpLooks up a single record in a table based on one or more criteria.
WithCalculates values and performs actions for a single record, including inline records of named values.
IndexReturns a record from a table based on ordered position.
DropColumnsReturns a table with one or more columns removed.
RenameColumnsRenames columns of a table.
ShowColumnsReturns a table with only selected columns.
ShuffleRandomly reorders the records of a table.
SearchFinds records in a table that contain a string in one of their columns.
GroupByReturns a table with records grouped together.
SortReturns a sorted table based on a formula.
ForAllCalculates values and performs actions for all records of a table.
TableCreates a temporary table.
AddColumnsReturns a table with additional columns.
FirstReturns the first record of a table.
FilterReturns a filtered table based on one or more criteria.
SequenceGenerate a table of sequential numbers, useful when iterating with ForAll.
DistinctSummarizes records of a table, removing duplicates.
SortByColumnsReturns a sorted table based on one or more columns.
FirstNReturns the first set of records (N records) of a table.
LastReturns the last record of a table.
LastNReturns the last set of records (N records) of a table.
UngroupRemoves a grouping.

Aggregate and count functions

Aggregate functions summarize a column into one number: totals, averages, the highest or lowest value, and counts of rows that match a condition.

FunctionWhat it does
MaxMaximum value of a table expression or a set of arguments.
MinMinimum value of a table expression or a set of arguments.
AverageCalculates the average of a table expression or a set of arguments.
StdevPReturns the standard deviation of its arguments.
VarPReturns the variance of its arguments.
SumCalculates the sum of a table expression or a set of arguments.
CountRowsCounts table records.
CountIfCounts table records that satisfy a condition.
CountCounts table records that contain numbers.
CountACounts table records that aren’t empty.

Data source and collection functions

These functions change data: create a collection, add or update records in a SharePoint list or Dataverse table, remove rows, and check what went wrong when a save fails. For a deeper guide, see Power Apps Collection.

FunctionWhat it does
CollectCreates a collection or adds data to a data source.
ClearCollectDeletes all data from a collection and then adds a set of records.
ClearDeletes all data from a collection.
ErrorsProvides error information for previous changes to a data source.
DefaultsReturns the default values for a data source.
ValidateChecks whether the value of a single column or a complete record is valid for a data source.
RevertReloads and clears errors for the records of a data source.
RelateRelates records of two tables through a one-to-many or many-to-many relationship.
DataSourceInfoProvides information about a data source.
RecordInfoProvides information about a record of a data source.
AsTypeTreats a record reference as a specific table type.
IsTypeChecks whether a record reference refers to a specific table type.
SaveDataSaves a collection to an app host such as a local device.
LoadDataLoads a collection from an app host such as a local device.
ClearDataClears a collection or all collections from an app host such as a local device.
Dataverse.UnmaskRequests the unmasked value of a secured column for a single Dataverse record.
ChoicesReturns a table of the possible values for a lookup column.
PatchModifies or creates a record in a data source, or merges records outside of a data source.
RefreshRefreshes the records of a data source.
UpdateReplaces a record in a data source.
RemoveRemoves one or more specific records from a data source.
RemoveIfRemoves records from a data source based on a condition.
UpdateIfModifies a set of records in a data source based on a condition.
UnrelateUnrelates records of two tables from a one-to-many or many-to-many relationship.

Variable functions

Variables hold a value while the app runs. Set creates a global variable for the whole app, and UpdateContext creates a context variable for one screen. For a deeper guide, see Power Apps Global vs Context Variables.

FunctionWhat it does
UpdateContextSets the value of one or more context variables of the current screen.
SetSets the value of a global variable.

Navigation and app functions

These functions control the app itself: move between screens, open a URL, show a message, ask for confirmation, download or print, and read who the current user is.

FunctionWhat it does
BackReturns to the screen that was displayed before.
UserReturns information about the current user.
ExitExits the currently running app and optionally signs out the current user.
ConcurrentEvaluates multiple formulas concurrently with one another.
PDFExport contents from the current screen to an object for use in multiple scenarios.
LanguageReturns the language tag of the current user.
ShowHostInfoDisplays information to the user in the app.
EnableTurns on a device signal, such as Location, so the app can read it.
DisableTurns off a device signal, such as Location, to save battery.
ReadNFCReads a Near Field Communication (NFC) tag.
NavigateChanges the screen that’s displayed, with an optional transition.
NotifyDisplays a banner message to the user.
ConfirmShows a confirmation dialog box and returns whether the user confirmed.
DownloadDownloads a file from the web to the local device.
PrintOpens the current screen in the default browser print dialog.
CopyCopies text to the clipboard on the device where the app is running.
LaunchLaunches a webpage or a canvas app.
ParamAccess parameters passed to a canvas app when launched.

Form and control functions

Form functions save or reset an Edit form and switch it between new, edit, and view mode. Control functions reset an input, move the cursor, or run another control’s OnSelect.

FunctionWhat it does
ResetResets an input control to its default value, discarding any user changes.
ResetFormResets a form control for editing of an existing item.
NewFormResets a form control for creation of an item.
EditFormResets a form control for editing of an item.
SelectRuns the OnSelect formula of another control, as if the user selected it.
SetFocusMoves input focus to a specific control.
ViewFormResets a form control for viewing of an existing item.
RequestHideHides a SharePoint form.
SetPropertySimulates interactions with input controls.
SubmitFormSaves the item in a form control to the data source.

Date and time functions

Date and time functions return today’s date, add or subtract days and months, find the difference between two dates, and pull out the year, month, or hour. Power Apps shows dates in the user’s local time zone.

FunctionWhat it does
YearRetrieves the year portion of a date/time value.
MonthRetrieves the month portion of a date/time value.
DayRetrieves the day portion of a date/time value.
DateTimeReturns a date/time value, based on both date and time components.
DateReturns a date/time value, based on Year, Month, and Day values.
TimeReturns a date/time value, based on Hour, Minute, and Second values.
TimeValueConverts a time-only string to a date/time value.
DateTimeValueConverts a date and time string to a date/time value.
EOMonthAdds or subtracts months to a date, returning the last day of that month.
EDateAdds or subtracts months to a date, without changing the day of the month.
HourReturns the hour portion of a date/time value.
MinuteRetrieves the minute portion of a date/time value.
SecondRetrieves the second portion of a date/time value.
WeekNumReturns the week number of a date/time value.
ISOWeekNumReturns the ISO week number of a date/time value.
TimeZoneOffsetReturns the difference between UTC and the user’s local time in minutes.
ClockRetrieves information about the clock for the current locale.
CalendarRetrieves information about the calendar for the current locale.
NowReturns the current date/time value in the user’s time zone.
DateDiffSubtracts two date values, and shows the result in days, months, quarters, or years.
DateValueConverts a date-only string to a date/time value.
DateAddAdds days, months, quarters, or years to a date/time value.
WeekdayRetrieves the weekday portion of a date/time value.
TodayReturns the current date-only value.
IsTodayChecks whether a date/time value is sometime today in the user’s time zone.

Conversion and JSON functions

Conversion functions change a value from one type to another: text to number, text to Boolean, a GUID string to a GUID, and a JSON string to values you can use in the app.

FunctionWhat it does
FloatConverts a string to a Float value.
BooleanConverts a text string, number, or dynamic value to a Boolean value.
JSONGenerates a JSON text string for a table, a record, or a value.
ColumnReads the value of a named column from a dynamic (untyped) object, such as parsed JSON.
ColumnNamesReturns the column names of a dynamic (untyped) object, such as parsed JSON.
Dec2HexConvert a number to a hexadecimal text string.
Hex2DecConvert a hexadecimal text string to a number.
TypeDefines a user defined type.
RecordOfExtracts the type of a record from a table.
ValueConverts a text string to a number.
GUIDConverts a GUID string to a GUID value or creates a new GUID value.
ParseJSONConverts JSON document represented as text to a Dynamic value value.

Error handling and testing functions

Error functions catch a failed formula and show a friendly message instead, create your own errors, and check whether a value is an error. For a deeper guide, see Power Apps Exception Handling.

FunctionWhat it does
IfErrorDetects errors and provides an alternative value or takes action.
ErrorCreate a custom error or pass through an error.
IsErrorChecks for an error.
IsBlankOrErrorChecks for a blank value or error.
TraceProvide additional information in your test results.
AssertEvaluates to true or false in a test.

Math and trigonometry functions

Math functions round numbers, return remainders and absolute values, generate random numbers, and handle powers, logarithms, and trigonometry.

FunctionWhat it does
RoundRounds to the closest number.
RoundUpRounds up to the smallest next number.
RoundDownRounds down to the largest previous number.
IntRounds down to the nearest integer.
TruncTruncates the number to only the integer portion by removing any decimal portion.
AbsReturns the absolute value of a number.
PowerReturns a number raised to a power. You can also use the ^ operator.
SqrtReturns the square root of a number.
RandReturns a pseudo-random number between 0 and 1.
RandBetweenReturns a pseudo-random number between two numbers.
ExpReturns e raised to a power.
LnReturns the natural log.
LogReturns the logarithm in any base of a number.
PiReturns the number π.
SinReturns the sine of an angle specified in radians.
CosReturns the cosine of an angle specified in radians.
TanReturns the tangent of an angle specified in radians.
CotReturns the cotangent of an angle specified in radians.
AsinReturns the arcsine of a number, in radians.
AcosReturns the arccosine of a number, in radians.
AtanReturns the arctangent of a number, in radians.
Atan2Returns the arctangent based on an (x,y) coordinate, in radians.
AcotReturns the arccotangent of a number, in radians.
DegreesConverts radians to degrees.
RadiansConverts degrees to radians.
ModReturns the remainder after a dividend is divided by a divisor.

Color functions

Color functions turn a hex code or CSS color name into a color, build a color from red, green, blue, and alpha values, and make a color lighter or darker.

FunctionWhat it does
ColorValueTranslates a CSS color name or a hex code to a color value.
ColorFadeFades a color value.
RGBAReturns a color value for a set of red, green, blue, and alpha components.

AI functions

AI functions use AI Builder prompts to classify, summarize, translate, or reply to text right inside a formula. They need AI Builder capacity in your environment.

FunctionWhat it does
AIClassifyClassifies text into one or more categories.
AIExtractExtracts specified entities like registration numbers, phone numbers, or people’s names.
AIReplyDrafts a reply to the message that you provide.
AISentimentDetects the sentiment of the text that you provide.
AISummarizeSummarizes the text that you provide.
AITranslateTranslates text from one language to another.

Frequently Asked Questions

What is the difference between a function and a formula in Power Apps?

A function is one named operation, such as Filter or DateAdd, that takes arguments and returns a value. A formula is everything you type in a property, and it can combine several functions, operators, and control values, for example Text(DateAdd(Today(), 7), "mm/dd/yyyy").

Are Power Apps functions the same as Excel functions?

Many look the same, because Power Fx, the formula language of Power Apps, borrows heavily from Excel formulas. Functions such as If, Sum, Left, and Round work much like they do in Excel. Power Apps adds functions that Excel doesn’t have, such as Navigate, Patch, and Collect, and it works with tables and records instead of cell ranges.

What is a behavior function in Power Apps?

A behavior function changes the state of the app, for example Navigate, Set, Collect, Patch, or Notify. You can use behavior functions only in behavior properties such as OnSelect, OnChange, or OnVisible. Other functions can go anywhere and recalculate automatically when their inputs change.