Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

FormatNumber issues in a flow

(0) ShareShare
ReportReport
Posted on by 37

I have two cells in the same row in a HTML table within a flow, which takes data from a SharePoint list. Both numbers in the list are formatted as currency in the list, the first one is just a number, and the second is a calculated field.

I formatted the first number in the flow, and it worked fine, but when I tried to format the second number the flow keeps failing.

If I do not use any formatting of the second number, the flow works fine, but the cell out put has around 10 decimal places.

Is there an issue with formatting calculated fields in Power Apps? If so, is there a work around? Many thanks!

  • CallistusL Profile Picture
    10 on at
    Re: FormatNumber issues in a flow
    From a SharePoint list and currency field:
    • formatNumber(items('For_each')?['Cost'],'C2') - doesn't work
    • formatNumber(float(items('For_each')?['Cost']),'C2') - doesn't work
    • formatNumber(int(items('For_each')?['Cost']),'C2') - doesn't work

    and because there is no versioning in Power Automate I can't go back to what worked previously to figure out what was different! 

    😠
  • Verified answer
    SaltySeaDog Profile Picture
    37 on at
    Re: FormatNumber issues in a flow

    Hi,

    I applied 

    formatNumber(float(items('Apply_Info_to_Each_TMDetailsHTML')?['TMLabour']),'C2') and it worked.
    Thanks, it was driving me crazy.
  • Verified answer
    Expiscornovus Profile Picture
    31,637 Most Valuable Professional on at
    Re: FormatNumber issues in a flow

    Hi @SaltySeaDog,

     

    In that case have you tried the below instead?

    formatNumber(float(items('Apply_Info_to_Each_TMDetailsHTML')?['TMLabour']),'C2')
  • SaltySeaDog Profile Picture
    37 on at
    Re: FormatNumber issues in a flow

    Hi,

    Here is the expression:

    formatNumber(items('Apply_Info_to_Each_TMDetailsHTML')?['TMLabour'],'C2')
  • Expiscornovus Profile Picture
    31,637 Most Valuable Professional on at
    Re: FormatNumber issues in a flow

    Hi @SaltySeaDog,

     

    Can you share your formatnumber expression?

     

    As far as I am aware calculated numbers are returned as strings. Which means you would first have to convert the string (text) to float (decimal) before you use a formatnumber function on it.

     

    Below is an example which converts it to decimal and uses the C2 format to convert it to a currency with two decimals.

     

    formatnumber(float(triggerOutputs()?['body/Cost']), 'C2', 'en-gb')

     

    currency_twodecimals.png 

  • SaltySeaDog Profile Picture
    37 on at
    Re: FormatNumber issues in a flow

    Hi,

    Please see the flow below, note that I move the calculated column to its own row to see if that would work, it didn't. I also changed the calculated column to a number by using the VALUE function in my SharePoint list but that didn't work either. FYI the Yes side of the Condition works fine.

    I am pretty new at this, and it you can help it would be much appreciated, as this is giving me a sore head.

    Thanks

     

    Workflow 1.JPG

    Workflow 2.JPG

    Workflow 3.JPG

    Workflow 4.JPG

    Workflow 5.JPG

    Workflow 6.JPG

    Workflow 7.JPG

    Workflow 8.JPG

    Workflow 9.JPG

  • v-jefferni Profile Picture
    on at
    Re: FormatNumber issues in a flow

    Hi @SaltySeaDog ,

     

    Could you please share screenshots of your flow in edit mode?

     

    Best regards,

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,603 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow