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

Notifications

Announcements

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,270 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,270 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard