web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Currency and Percentag...
Power Automate
Answered

Currency and Percentage in body of email

(0) ShareShare
ReportReport
Posted on by 407

I've searched through past posts and haven't quite found what I'm looking for however I've tried some of the suggestions.

 

I'm sending an email out after a proposal has been sent for approval.  This email is going to just notify a couple people that an approval has started with a few bits of information from the SP list.  I'm having an issue pulling the information from the calculated columns for the $ amounts and percentage.

 

Any suggestions so that this would show as $123,000, $125,000 and 1.62%?  As mentioned, I've tried a few things that I've found, but still ending up with below.  THANKS!

 

emailinfo.jpg

Categories:
I have the same question (0)
  • Verified answer
    tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @DCNehs ,

    Power Automate has formatNumber(...) expression which you could use. It expects the number as the first parameter and then the number format. 

    formatNumber(number, 'format')

    In your case you'll need format 'C' for the currency and format 'P' for the percentage. If you add a number to it, it'll define also how many decimal places you want, e.g. 'C0' is currency with 0 decimal places, 'P5' is percentage with 5 decimal places.

    image.png

    If you're interested you can find the list of all available formats here: Standard numeric format strings | Microsoft Docs

     

  • DCNehs Profile Picture
    407 on at

    @tom_riha aha, ok.  I had seen this mentioned in a different conversation and it didn't work but i think i figured out what was happening.  We were using a copy of someone else's list and they had text columns and I'll need to change them into number columns.  I also found a video that helped.

     

    The only other issue I still have is that the % column is a calculated column and I'm having an issue with that.  It says it's looking for an integer or number and it technically is.  Will need to play with that a little more.

  • DCNehs Profile Picture
    407 on at

    @tom_riha , I've tried several different scenarios and still cannot get the sharepoint column to show up correctly in the email.  Getting the following error:

     

    Unable to process template language expressions in action 'Compose_2' inputs at line '1' and column '37726': 'The template language function 'formatNumber' expects its first parameter to be an integer or a decimal number. The provided value is of type 'String'. Please see https://aka.ms/logicexpressions#FormatNumber for usage details.'.

     

    Is it because of how I have the calculated column set up?  Maybe it doesn't like calculated columns?

     

    margin.jpg

     

    calcmargin.jpg

  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @DCNehs ,

    Calculated column might be the problem, but you can move the formula directly in Power Automate, I suppose you've got all 3 columns from the formula available as a dynamic content so you can use them in an expression:

    div(add(COSellPriceUSD,-COCostUSD),COSellPriceUSD)
    
    Note:
    all the values should be a dynamic content

    And then format the result as a percent:

    formatNumber(div(add(COSellPriceUSD,-COCostUSD),COSellPriceUSD),'P2')
  • DCNehs Profile Picture
    407 on at

    I apologize for being dumb here but I'm still a real beginner.  Having to learn really quick for a project and feeling completely stupid.  Am I doing that with a Compose?  I tried that as well as some type of variable but all come back as different errors.

  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @DCNehs ,

    you can do it in a Compose action or you can use the expression directly in an email. The important part is to use your dynamic contents in the expression, not the placeholder column names I used.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard