Are you in need of format numbers without decimals in Power Automate? This Power Automate tutorial will help you format numbers without Decimals using Power Automate.
Scenario:
Recently, I got a requirement to format the numbers without decimals using Power Automate flow. For example, For example, if the value is 60.00% after formatting, it should return the value as 60% without decimal using flow.
Finally, I have to send an email with detailed information about the Product List to the user using the send email (v2) action.
Before creating a flow, we have to create a SharePoint list, so here I am going to use the below SharePoint Product list consisting of,
| Column Names | Column Type |
| ProductName | default title column |
| ProductQuantity | Number column |
| ProductPrice | Number column |
| ProductStatus | Choice column |
| DiscountsInPercentage | Number column |
| ProductPriceAfterDiscount | Calculated Column |

Now, we will create a flow to format the DiscountsInPercentage column values from decimal to without decimal using Power Automate flow.
Format a Number without Decimal in Power Automate
Let us see how to format numbers without decimals in Power Automate flow
Follow the below-mentioned steps:
Step-1:
Create an instant cloud flow with the manual trigger. Select a new step and add a Get items action to get all the items from the SharePoint list.
Expand the get items action and configure the required parameters,
- SharePoint site address – select the SharePoint site from the dropdown
- List name – choose the list from the dropdown (I have selected my Product List).

Step-2:
Add a new step, choose the Select data operation, and choose the From Option as a value from dynamic content. Similarly, in the map, enter key and map values from the dynamic content.
Here, I have formatted the Product Price value with the below expression to display the price value in a currency format.
formatNumber(item()?['ProductPrice'],'C0')

To Format a Percentage value without decimals, use the below expression, which formats the value from 60.00% to 60%.
formatNumber(item()?['DiscountsInPercentage'],'0%')

Similarly, ProductPriceAfterDiscount, I have formatted the Product Price value with the below expression to display the price value in a currency format.
formatNumber(float(item()?['ProductPriceAfterDiscount']),'C0')

Step-3:
In this next step, we will create an HTML table by selecting the ‘Create HTML table‘ action from the action triggers.
Next, in the From box, select the ‘output’ from the dynamic content for the select data operation action, and in the Columns box, select Automatic.
body('Select')

Step-4:
Add a compose action to apply the style for the generated HTML table; for that, add the CSS code below.
<style>
table {
border: 1px solid #1C6EA4;
background-color: #EEEEEE;
width: 100%;
text-align: left;
border-collapse: collapse;
}
table td, table th {
border: 1px solid #AAAAAA;
padding: 3px 2px;
}
table tbody td {
font-size: 13px;
}
table thead {
background: #1C6EA4;
border-bottom: 2px solid #444444;
}
table thead th {
font-size: 15px;
font-weight: bold;
color: #FFFFFF;
border-left: 2px solid #D0E4F5;
}
table thead th:first-child {
border-left: none;
}
</style>
