cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MindfulMike
Helper II
Helper II

How to convert decimals to percentage and formatting currency in HTML email

Hi all!

 

I have some columns in my sharepoint list that are percentages and currencies shown below: 

MindfulMike_0-1642090008799.png      

 

MindfulMike_1-1642090047123.png

 

I am creating an auto email to be sent out and formatting it in HTML but when I receive the email it's showing up as this: 

 

MindfulMike_0-1642090300096.png

and Total Commission is showing as 4305000

 

How can I convert this in HTML to show the easier to read percentage and currency shown in my sharepoint list?

 

These are snips from my HTML email 

 

MindfulMike_1-1642090471948.png

 

MindfulMike_2-1642090553737.png

 

 

Thanks in advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @MindfulMike ,

you don't need another flow, but instead of using the dynamic content directly in the HTML, use the formatNumber(...) expression, e.g.

formatNumber(<Overhead dynamic content>, 'P')
formatNumber(<Total commission>, 'C')

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

4 REPLIES 4
tom_riha
Super User
Super User

Hello @MindfulMike ,

Power Automate gives you two options, one is to use the 'Format number' action to format the date, the other one is to use the FormatNumber(...) expression, e.g. to format number as a currency:

formatNumber(<number>,'C')

or to format number as a percentage

formatNumber(<number>,'P')

you can see the various format options here: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Thank you for responding. 

 

So what I'm understanding from your response, I would have to create another flow to format the number or percentage and then use that flow when I craft my HTML email instead of directly from my sharepoint list?

Hello @MindfulMike ,

you don't need another flow, but instead of using the dynamic content directly in the HTML, use the formatNumber(...) expression, e.g.

formatNumber(<Overhead dynamic content>, 'P')
formatNumber(<Total commission>, 'C')

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Thank you for you advice, worked like a charm.

 

I used the following expressions :

formatNumber(<dynamic content>,'C0','en-US')

formatNumber(<dynamic content>,'P0','en-US')

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (3,272)