Reference · Power Fx · Desktop flows

Power Automate Desktop Formula Reference

All 130 Power Fx functions you can use in Power Automate desktop flows, with desktop-style examples and the rules that differ from Power Apps.

Works with
  • Power Automate

130 formulas9 categoriesPress / to search

130 formulas

A

B

C

D

E

F

G

H

I

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 an example into an action input in your desktop flow (keep the = at the start), and swap in your own variables.

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.
  • 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.
  • And · Returns true only when every argument is true. The && operator does the same.
  • Asin · Returns the arcsine of a number, in radians.
  • 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

  • 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

  • Char · Returns the character for an ASCII code.
  • Clear · Removes every record from a collection.
  • ClearCollect · Empties a collection and then fills it with new records, in one step.
  • 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.
  • 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.
  • 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

  • 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.
  • Decimal · Converts text to a decimal number, keeping exact decimal precision.
  • Degrees · Converts radians to degrees.
  • Distinct · Returns the unique values of a formula across a table.
  • 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.
  • 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.
  • 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

  • GUID · Creates a new GUID, or converts GUID text into a GUID value.

H

  • Hex2Dec · Converts hexadecimal text to a number.
  • 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.
  • 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.
  • IsNumeric · Checks whether a value is a number or text that can be read as a number.
  • IsToday · Checks whether a date/time value falls on today in the user’s time zone.

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.
  • 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.
  • 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

  • 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

  • Not · Flips a Boolean value: true becomes false and false becomes true. Same as the ! operator.
  • 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

  • Patch · Creates or updates a record in a data source, or merges records.
  • 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.
  • 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.
  • Remove · Deletes specific records from a data source or collection.
  • RenameColumns · Returns a table with one or more columns renamed.
  • Replace · Replaces characters at a given position in a string.
  • 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

  • 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.
  • Sequence · Generates a single-column table of sequential numbers.
  • Set · Sets a global variable that every screen in the app can read.
  • ShowColumns · Returns a table with only the columns you list.
  • 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.
  • 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.
  • Summarize · Groups the rows of a table by one or more columns and calculates values for each group.
  • 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.
  • 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.
  • 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.

U

  • UniChar · Returns the character for a Unicode code point.
  • Upper · Converts all letters in a string to uppercase.

V

  • Value · Converts text to a number.
  • VarP · Returns the variance of a formula across a table, or of a list of numbers.

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

How do I use Power Fx in a desktop flow?
Turn on the Power Fx option when you create a new desktop flow in Power Automate for desktop. Then type expressions in action inputs, starting with an equals sign.
Why does every formula start with "="?
In Power Fx–enabled desktop flows, an input that starts with = is a formula. Anything else is treated as plain text, so numbers and true/false also need the =.
How do I put a formula inside text?
Use string interpolation without the equals sign: The total is ${Sum(10, 20)}. To write a literal ${, type $${.
Why is the first item number 1?
Like Excel, Power Fx counts from 1, so Index(List, 1) is the first item. Classic desktop flows without Power Fx count from 0.
Why does my variable say it doesn’t exist?
Variable names are case-sensitive in Power Fx–enabled flows (NewVar and newVar are different), and a variable must be set before a formula uses it.

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