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 / Multiple formatNumber ...
Power Automate
Answered

Multiple formatNumber (fx)

(0) ShareShare
ReportReport
Posted on by 62

It is possible to generate a string with the expression

 

formatNumber(float(item()?['Sales LY']),'C2','es-ES')

 

apenyaranda1985_0-1710843859317.png

 

Basically I want to format more than one column, but not all, at the moment I have added a "compose" step with the expression described above but only for one of the columns, I would like to add more columns.
Thank you.

Categories:
  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @apenyaranda1985 ,

     

    There is no need to put the expression in Compose, you can insert the expression in "Append to array" directly. This is also for other columns.

    vmengmlimsft_0-1710846101160.png

     

     

    Best regards,

    Rimmon

  • apenyaranda1985 Profile Picture
    62 on at

    Hello @v-mengmli-msft 

    Now I get the error:

     

     

    Unable to process template language expressions in action 'Anexar_a_la_variable_de_matriz_2' inputs at line '0' and column '0': 'The template language function 'empty' expects its parameter to be an object, an array or a string. The provided value is of type 'Float'. Please see https://aka.ms/logicexpressions#empty for usage details.'.

     

    I think it is because it does not detect any value, it is possible since some row does not contain a value, I have tried the following but it does not work for me

     

    if(empty(item()?['Ventas Totales']),'0',formatNumber(item()?['Ventas Totales'],'C2','es-ES'))

     

  • Verified answer
    v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @apenyaranda1985 ,

     

    You can use string to convert float to string when you check if "item()?['ColumNanme']" is empty.

     

    if(empty(string(item()?['Ventas Totales'])),'0',formatNumber(item()?['Ventas Totales'],'C2','es-ES'))

     

     

    ——————————————————————————————————————————————————

    If my answer helps you solve the problem, please accept it as a solution.

    If you have another question, please post it in forum.

     

     

    Best regards,

    Rimmon

  • apenyaranda1985 Profile Picture
    62 on at

     

    Unable to process template language expressions in action 'Anexar_a_la_variable_de_matriz_2' inputs at line '0' and column '0': 'The template language function 'if' expects its first parameter to be of type boolean. The provided value is of type 'String'. Please see https://aka.ms/logicexpressions#if for usage details.'.

    gives the following error, similar but not the same. 

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @apenyaranda1985 ,

     

    Sorry about that. I just modified my reply, please try the newest.

  • apenyaranda1985 Profile Picture
    62 on at

    Now it works perfectly for me. Thank you!

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 130

Last 30 days Overall leaderboard