How to Format Number to Percentage in Power Automate? [3 Useful Examples]

Do you need to format a number to a percentage in Power Automate? Then, this Power Automate tutorial will help you format a number to a percentage with different examples.

Scenario:

Recently, I got a requirement to format a percentage using Power Automate flow. Here I will show three different examples to format a number to percentage in Power Automate.

In the first example, we will see how to use the Format number action to format a number to a percentage using flow.

In the second example, we will see how to use the format-number function to format a number to a percentage using flow.

Finally, I will show you how we can get the number value from the SharePoint online list, format it to the percentage value, and update the formatted percentage value to the SharePoint list field using Power Automate.

Before creating a flow, we have to know what standard formats are available to display a number as a percentage. The Standard format ‘P’ supports the Format Number action and the format-number function in Power Automate.

FormatExpressionNumberOutput
PformatNumber(0.1,’P’)0.110.00 %
P0formatNumber(0.1,’P0’)0.110 %
P1formatNumber(0.1,’P1’)0.110.0 %
P2formatNumber(0.1,’P2’)0.110.00 %
P3formatNumber(0.1,’P3’)0.110.000 %

Now, we will create a flow to format a number value to a percentage value using Power Automate flow.

How to Format Number to Percentage in Power Automate

Let us see how to format a number value to a percentage value in Power Automate flow,

Example-1:(Using Format Number action)

Here, we will see how to format a number value to a percentage value by using the Format Number action in Power Automate flow

See also  How to Save Microsoft Forms Responses and Attachments to SharePoint Lists using Power Automate?

Step-1:

Create an instant cloud flow, expand the trigger action, and add a Number input as below:

power automate format number percentage

Step-2:

Add a new step and choose the Format Number action from the action trigger. Provide the required parameters.

  • Number – Pass the dynamic content of the number input
  • Format – Now choose the Standard format ‘P0’, which formats the number value and displays the value in a percentage format.
  • Locale – a locale that is used to format the number (optional field)
triggerBody()['number']
How to format number to percentage in Power Automate flow

Step-3:

Save and Run the flow. Enter the number input and choose the run flow option

How To Format A Number In Power Automate

Once the flow runs successfully, we can see that the number value is formatted to a percentage value in the expected output section.

Here, I have given the input value as 0.8 and selected the Percentage format P0, so it displays the output value as 80%.

Format number to Percentage in Power Automate

This is how to format a number value to a percentage value by using the Format Number action in Power Automate flow.

Example-2:(Using Format Number function)

Now we will see how to format a number value to a percentage value by using the Format Number function in Power Automate flow

Step-1:

Create an instant cloud flow, expand the trigger action, and add a Number input as below:

power automate format number percentage

Step-2:

Add a compose data operation, and pass the below expression to format a number value to a percentage value under the Expression tab.

formatNumber(triggerBody()['number'], 'P')

Where,

  • formatNumber – function name
  • number – input value
  • P – Standard Percentage format
Format number to Percentage in Power Automate flow

Step-3:

Save the flow. Enter the number input and choose the run flow option.

How to Format Number to Percentage in PowerAutomate

Once the flow runs successfully, we can see that the number value is formatted to a percentage value in the expected output section.

See also  Power Automate Get items

Here I have given the input value as 0.3 and selected the Percentage format P, so it displays the output value as 30.00%.

How to change the number format to percentage in Power Automate flow

This is how to format a number value to a percentage value by using the Format Number function in Power Automate flow.

Example-3:(Update SharePoint list field with Formatted Percentage Value)

Let us see how we can Update the SharePoint list field with Formatted Percentage Value using Power Automate flow.

In this example, I am going to use the below SharePoint Products list, consisting of,

Column NameColumn Type
ProductNamedefault title column
ProductPriceNumber column
ProductStatusChoice column
DiscountsNumber column
DiscountsInPercentageText column
Number to percent conversion using Power Automate Flow

To achieve this, follow the below steps:

Step-1:

Create an automated cloud flow, and choose the trigger When an item is created or modified action from action triggers. Configure the required Parameters as highlighted below:

  • Site Address – From the dropdown, select the SharePoint site address
  • List – Choose the list name from the dropdown. (Here, I have selected my SharePoint Products List)
convert number to percentage in Power automate

Step-2:

Add a compose data operation, and pass the below expression to format a number value to a percentage value under the Expression tab.

formatNumber(triggerOutputs()?['body/Discounts'],'P0')

Where,

  • formatNumber – function name
  • Discount – SharePoint column internal name
  • P0 – Standard Percentage format
convert number to percentage in Power automate flow

Step-3:

Select an Update item action from the action triggers and provide the required parameters:

  • Site Address – From the dropdown, select the SharePoint site address
  • List – Choose the list name from the dropdown.
  • ID– Select the ID from the dynamic content value
  • Title – From the dynamic content, choose the title value
  • DiscountsInPercentage – Pass the outputs of the compose data operation, which formats the number value to the percentage value.
Number to percent conversion in Power Automate Flow

Step-4:

See also  When an item is created in SharePoint list send approval and create item using Power Automate

Save the flow. The flow will trigger only when the new item is added or modified to the SharePoint list.

Here, I have added the new item with a discount value of 0.5, as highlighted below:

Format number Power Automate flow

Once the flow runs successfully, like below:

Format number to Percentage in flow

We can see that the number value is formatted to a percentage value and updates the values in the SharePoint list DiscountsInPercentage column.

Format number to percentage on Power Automate

This is how to Update the SharePoint list field with Formatted Percentage Value using Power Automate flow.

Conclusion

I hope you know how to format a number to a percentage using Power Automate flow. Here, I have done three different examples; in the first example, I have shown you how to format a number to a percentage using the Format Number action.

In the second example, I have shown you how to format a number to a percentage using the Format Number function.

In the other example, I have shown you how to Update the SharePoint list field with Formatted Percentage Value using Power Automate flow.

You may also like:

>