cancel
Showing results for
Did you mean:
New Member

## Decimal places for a number sent to email using Power Automate/Flow

Hello,

First off, I am a total newbie with this kind of thing, I'm working on a simple menu ordering system based on an MS Form, Excel, 2 emails and a Sharepoint list which stores the final data.

So, the Customer completes the form, power automate gets the response details, adds a row into an Excel table, Excel calculates the order total which is then grabbed using Compose and passed to an e-mail.

After some faffing around I have it working except for one thing.... When I pass the order total figure to the e-mail which will be sent to the customer, the figure is being cut to one decimal place if it ends with a zero, for example 17.25 displays fine in the e-mail body, but 17.10 displays as 17.1.

How do I correct this and force 2 decimal places so that zeros are displayed? Am I missing something really obvious (probably)?

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User

Hi @KSG1,

You could use a formatnumber function. With this you specify the format you want.

In your setup you could add this expression to the body:

``formatNumber(float(outputs('Compose')?['Amount Total (Ex VAT)']), '0,0.00')``

4 REPLIES 4
Dual Super User

Hi @KSG1,

You could use a formatnumber function. With this you specify the format you want.

In your setup you could add this expression to the body:

``formatNumber(float(outputs('Compose')?['Amount Total (Ex VAT)']), '0,0.00')``

New Member

Hi Expiscornovus, thank you thank you, that worked! Fantastic!

Dual Super User

Hi @KSG1,

Btw, if you want to go a step further you could even use a currency format, like C2. This format will use two decimals and include the currency symbol as well 😁

``formatNumber(float(outputs('Compose')?['Amount Total (Ex VAT)']), 'C2')``

New Member

Great I'll add that in, thanks again!

Announcements

#### Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

#### Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

#### Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,568)