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 / Format number not work...
Power Automate
Unanswered

Format number not working?

(0) ShareShare
ReportReport
Posted on by 4

I am looking at formating a number using the following: 

 formatnumber(float(item()?['Gross Daily']),"[Color 10] 0.00% ▲;[Red] -0.00% ▼")

the formula works fine when I use:

formatnumber(float(item()?['Gross Daily']),'p2')   (to return simply a noncolored percent with 2 decimals)

My format above works in excel perfectly and it appears to meet the correct syntax, yet when I try to place it as an expression Power automate tells me it is invalid.  

 

Any thoughts on where I am making a mistake?

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,851 Most Valuable Professional on at

    Hi @Hedgie,

     

    That is the Excel syntax. The formatnumber function in the expression language supports numeric format strings as formats. 

     

    Below are the lists for standard and custom numeric format strings which are supported: 

    https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings

    https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings

     

    What you have used in that format is not listed in those two lists. 

     

    But you might be able to workaround this by using an if function instead.

    if(less(float(item()?['GrossDaily']), 0), concat('Red ', formatnumber(float(item()?['GrossDaily']),'p2'), ' ▼'), concat('Green ', formatnumber(float(item()?['GrossDaily']),'p2'), ' ▲'))
  • grantjenkins Profile Picture
    11,063 Moderator on at

    Where are you going to store the output? Will it be Excel or a SharePoint list?

     

    If it's going into a SharePoint list then I'd be outputting just the percentage, and use Column Formatting on the List to add the colors and icons, etc.

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 604

#2
Valantis Profile Picture

Valantis 502

#3
Vish WR Profile Picture

Vish WR 417

Last 30 days Overall leaderboard