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 / How to use formatNumbe...
Power Automate
Unanswered

How to use formatNumber() with an array of values from a excel file

(0) ShareShare
ReportReport
Posted on by 2

Hey everyone,

 

I'm working on a project and need to display an array of prices in an html table formatted correctly. I've read about the formatNumber function which seems to convert a value to a specified currency. When trying to utilize this function I've run into a compile error.

 

What I want to do is : formatNumber(item()?['Prices'], 'C2','en-US') but get the following error message:  'The template language function 'formatNumber' expects its first parameter to be an integer or a decimal number. The provided value is of type 'String'.

 

I've tried to convert to an integer and float but had no luck. Was wondering if I could get some input.

 

Cheers. 

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @tony_soprano_99 

    Try wrapping your first parameter in a float() expression.

     

     

  • tony_soprano_99 Profile Picture
    2 on at

    Unfortunately this did not work, I entered: 

     

    formatNumber(float(item()?['Prices']),'C2','en-US') and was greeted with this error message: 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @tony_soprano_99 

    Can you post a screen shot of your Flow please?

     

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 411

#2
David_MA Profile Picture

David_MA 300 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 291

Last 30 days Overall leaderboard