In this Microsoft Power Automate Tutorial, we will see various examples of Power Automate Number Format. We will learn how to format a number to different data types such as:
- Power Automate check if it is number or not
- Power Automate convert number to currency
- Power Automate convert number to hexa decimal
- Power Automate format number percentage
- Power Automate convert a number to rounding UP or Down
- Power Automate convert value to string
- Power Automate convert number to date
- Power Automate convert integer to array
Power Automate check if it is number or not
In Power Automate, there is no direct function or expression to check whether the input is a number or not. So we will resolve this issue by following these steps.
Step-1:
First, we will trigger a flow manually. For this, go to Power Automate > Click on Create > Select Instant cloud flow.

After clicking on that, it will create a flow like below:

Step-2:
Now we will initialize a variable. Then set the type as “boolean” and value as “True“.

(For our better reference, we just renamed the action name)
Step-3:
Now we will initialize another variable and set the type as “String” and give a value like below:

Step-4:
Then we will add a Compose action that will convert the above string variable into an integer. For this expression is:
int(variables('VarNumber'))

Step-5:
In the next step, we will set our previous variable “VarIsInteger” as false because if the Compose action fails.

In this step, also we have to set the “Configure run after – has failed” to true and click on Done like below.


Step-6:
Then finally we will put a condition that will check whether the variable “VarIsInteger” is true or not.

Here also, we have to set “configure run after” as succeed and skipped. It is a very important step because if we don’t want to always fail our flow then we have to configure it.

Read Power Automate Initialize Variable
Testing for Non-numeric data type or not
Now we just save the flow and test it as a Manual test. We can see it will return false as our input “123abc” in “VarNumber” is not a number.

Read Power Automate convert time zone
Testing for Numeric data type or not
Now, we will check whether the input is a number or not. For this, we will do a modification on value from “123abc” to “123“. Then save the flow and test it again.
We can see it will return true as the input is an integer or number.

This is how we can check whether the input is a number or not in Microsoft Power Automate flow. You can download this flow from here.
Read Power Automate Concatenate String
Power Automate convert number to currency
Recently, we have worked on a SharePoint list where we have to insert the project’s Title(Single line text) and its cost(Currency type).
Here is our SharePoint list:

When a user inserts that details in SharePoint List it will notify the CEO or another user. For this, we have created an automated flow and fetched this list on that flow.

When the CEO or another user got that notification through mail, the cost is came as a number instead of currency like below:

But it is the right way to show the cost in a number instead of currency. To solve this issue, let’s have a look at the below solution with step-by-step guides.
Step-1:
We will add a “Compose” action just after the “When item is created” action. Here we will use “cost” as input from dynamic content.

Step-2:
After Compose, we will add another action “Format number” that will format the number into currency.

In Format number, we have used the output of composing as a number. Also, we have chosen a number format as $1,234.00 and Locale as en-US.
Step-3:
Now we will use this Formatted number as cost in the “Send an email” action.

Now our flow is ready to run. So first, we have to Save it and test the flow. This time when we will insert any value in SharePoint ist, we can see the cost will come in a currency format in our mailbox.

This is how we can Convert a number in currency format Power Automate flow. Similarly, we can format the number in any currency format such as ¥(yuan), €(Euro), ₹(rupee), etc. from Locale(in Format number).
Read Leave Request Approval Flow using Power Automate or Microsoft Flow
Power Automate convert number to hexa decimal
Here we are going to discuss how to implement this by following these easy steps.
Step-1:
In Power Automate, first, we have to trigger a flow automatically. For this, on Power Automate, go to create flow, then click on “Instant cloud flow” and select “Manually trigger flow“.

It will create a blank flow that will trigger the flow manually.
Step-2:
Now we will add an action “Format Number” that will format a number into hexadecimal. In that action, we will set a value that we can want to format. Also, set format type for hexadecimal as “X0” or “x0“.

Now just Save the flow and Run it. We can see the output is coming as hexadecimal like below:

As we put format type as “X0“, so the output came with a Capital letter. If we put format type as “x0” then the output will come in a small letter.

This is how we can convert any number into a hexadecimal format in Power Automate flow. You can download this flow from here.
Also read, How to convert decimal to whole number in Power Automate
Power Automate format number percentage
By following these steps we can convert a number into a percentage.
Step-1:
Before formatting, we need to manually trigger our flow. For this, we have to select “Manually trigger flow” from “Instant cloud flow” then click on Create.

Step-2:
After adding “Manually trigger flow“, now we will add another action “Format number” on that flow. That will convert any number to a percentage in Power Automate.

For example, we have set a number(i.e.1) that we want to format. Also, we have used “P0” as the format type. In “P0“, P stands for Percentage, and 0 stands for decimal value. When we run the flow, we can see the output will come as “100%“.

Similarly, if we use “P2“, then the output will come with two decimal values. For example:

This is how we can convert a value to a percentage in Power Automate. You can download this automated flow from here.
Check out, What is Power Platform
Power Automate convert a number to rounding UP or Down
Now we will discuss how to convert a number to rounding up or down in Power Automate or Microsoft flow.
For this, here we have provided a simple guide with 2 different methods. By following these we can easily convert a number to round up or down on Power Automate flow.
Method-1: by assigning a variable
For example, we have a number like 45.863; but we want to format this number to round up i.e. 46. To implement this, follow these steps:
Step-1:
On Power Automate, first, we will add “manually triggered a flow” that will trigger the flow manually as needed from Instant cloud flow. Then click on Create.

Step-2:
Under that trigger, we will add an action to initialize a variable i.e. Initialize variable. Here we will set a variable name, its type(it should be a string type), and a value(a dynamic value) like below.

Step-3:
Then we will add a Compose action. On that Compose action, we will use an expression that will convert the above string(number) into the round-up on Power Automate.
The expression is:
add(int(first(split(variables('MyVar'),'.'))),1)

Now our flow is ready to run. Also, we can see the out is coming as a round number like below:

This is how we can convert a number to rounding up or down on Power Automate.
Read How to move files from OneDrive to SharePoint using Power Automate
Method-2: using Formt number
There is another action “Format number” on Power Automate, by which we can format the number to rounding up.
For example, we have a number like 45.869. Now, we will see how to convert this number to rounding up or down on Power automate using Format number action.
On that, we will set a random number that we want to format. Also, on the format type, we will set “N2” which will format the number to round up with 2 decimal places.

Let’s save the flow and test & run it to see the output. We can see the output is coming from 45.869 to 45.87.

Similarly, if you insert N1 instead of N2, it will return the output as
In these above ways, we can convert a number into Rounding up or down on Power Automate. You can download the whole flow from here.
Read Scheduled cloud flow Example
Power Automate convert value to string
In this Power Automate Tutorial, we will discuss how to convert a value to a string in an automated flow or Microsoft flow.
There are various methods by which we can format a number or value to a string in Power Automate. We will describe these methods with step by step guide.
Method-1: Using String() function
In this method, we will see how to convert a number to a string using the string() function in Power Automate.
Step-1:
In Power Automate, we will add “Manually trigger a flow” from “instant cloud flow“.
Step-2:
After adding this trigger in our flow, we will add a compose action. In that action, we will use any static value as an input. For example, here we will use a random number i.e. 123

Step-3:
Again, we will add another Compose action that will format the output of the compose(i.e. 54321) into a string by using an expression. Insert the below expression in the expression bar and click on Update.
string(outputs('Compose'))

Now the flow is ready. So we need to just Save and test it. We can see the output is coming as “string“.

Note: In Power Automate, a numeric value comes as a “Green color” and a string value coming as “Black color“. Let’s have an example to check this.
For example, we will add another Compose action to convert the output of the compose(i.e compose-1) into an integer. And the expression is:
int(outputs('Compose'))

Similarly, when we save and test this flow we can see the output is coming as an integer(i.e. in Green color).

This is how we can convert a number to a string using the string() function in Power Automate Flow.
Also read, Power Automate Delete all items in SharePoint list
Method-2: Using Format number action
In this method, we will use convert a number into a string using “Format number” in Power Automate flow.
To implement this, we will add an action “Format number” after the “Compose“. In that action, we will use the output of composing (i.e. 54321) as a Number or you can insert any random number directly. And, in Format, we will set 0000 as the numeric format string.

Now the flow is ready to Run. We can see the output(i.e. 54321) is coming as String.

This is another format number to String on Microsoft Flow.
Also read, PowerApps upload file to SharePoint document library
Power Automate convert number to date
Now we will see how to convert a number to date format on Power Automate. For example, if we insert a number 310(you can insert a number dynamically), then it will be converted into a date format. Follow these steps to implement this:
Step-1:
On Power Automate, first, we will start the flow by triggering it manually. On that trigger, we will use the number data type as an input.

Step-2:
Then we will add a Compose action to formatting the date-time. For this, we are going to use an expression:
formatDateTime('1-1-2021','dd-MMM-yyyy')
Here, we used the ‘1-1-2021’ as our starting date.

Step-3:
Then, we are going to use an expression under another Compose action. To get the current date we need to add the number of days to the starting date.
addDays(outputs('Starting_date_format'),sub(triggerBody()['number'],1))
Here, we used 1 because if we only add the number, it will return tomorrow’s date not today’s date. To get today’s date we used 1 as the reference date is start from 1 not 0.

Step-4:
Now we will convert this output to timezone. For this, we will use the action “Convert timezone“. Let’s say we want to convert the timezone to Eastern standard time.

Now the flow is ready to run. When we will test it, it will ask to insert a number. Then it will calculate the date by adding that number of days to the starting date or reference date.
Let’s say we will insert a number i.e. 315. The output will come as:

As the starting date is January 1, 2021, so It is showing the Date that was added to 315 days of the starting date i.e. November 11, 2021.
This is how to convert a number to date on Microsoft flow.
Also read, Save my email attachments to a SharePoint document library Power Automate or Flow
Power Automate convert integer to Array
Now we will see how to convert an integer into an Array on Power Automate. For this, Microsoft flow provides an ‘array()‘ function.
For example, first, we will initialize a variable as integer value.

Then we will insert an expression under Compose action, that will convert the integer value into an array using the array().
array(variables('varInt'))

When we test the flow, we can see the output is coming as an array data type:

This is how to convert integer to array on power automate.
There is another function “createArray()” to create an array by using object. Here we can create an array using multi-integers.
For this, we are going to add another compose action using createArray expression.
createArray(78, 55, 66, variables('varInt'))

Now we can see there is an array created on the output:

This is how to convert multi-integer to array on Microsoft flow.
You may also like the following Power Automate tutorials:
- SharePoint auto generate column value using Power Automate or Flow
- Microsoft flow Send an email showing wrong time for SharePoint list column
- Send a customized email when a new SharePoint list item is added using Microsoft Power Automate or Flow
- Microsoft Flow Example: Copy Files from SharePoint to PC
- Microsoft Flow Example: Automatically create a profile for a new candidate
- Power Automate conversion of string
- Power Automate Trigger Conditions
Conclusion
From this Power Automate Tutorial, we learned all about number format on Power Automate. Also, we discussed:
- How to Power automate is number or not?
- How to convert number to currency on Power Automate?
- How to convert number to hexa decimal on Microsoft Flow?
- How to format number to percentage on Microsoft Flow?
- How to convert a number to rounding UP or Down on Power Automate?
- How to convert a value to string on Power Automate?
- How to convert number to date on Power Automate?
- How to convert number to time on Microsoft flow?
I am Bijay a Microsoft MVP (8 times –Â My MVP Profile) in SharePoint and have more than 15 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com