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 / Get a Row - Calculated...
Power Automate
Unanswered

Get a Row - Calculated Column returning as String (instead of number)

(0) ShareShare
ReportReport
Posted on by 104

I have a "Get a Row" action in my Flow. Within the Excel file, there is a calculated column that is set to 'Number' format. However when using this in the Flow, it adds on 13 decimal places to values in this column whereas in the Excel file, it is only set to 2 decimal places. The Flow looks like it is returning the value as a string rather than an integer. 

 

get a row.JPG

 

In the Flow, I have tried adding a Compose action with both formatNumber() and also Int() using the output from the Compose action in the screenshot above, but I am getting the below error messages:

 

Unable to process template language expressions in action 'Compose_2' inputs at line '0' and column '0': 'The template language function 'Int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

 

Unable to process template language expressions in action 'Compose_2' inputs at line '0' and column '0': 'The template language function 'formatNumber' expects its first parameter to be an integer or a decimal number. The provided value is of type 'String'. Please see https://aka.ms/logicexpressions#FormatNumber for usage details.'.

 

Does anyone have any ideas? Thanks!

 

 

 

 

Categories:
I have the same question (0)
  • JonDoesFlow Profile Picture
    1,304 on at

    Hi,

     

    Yes, you need to write the expression as:

     

    formatnumber(triggerBody()['number'],'0.00')
     
    where "triggerBody()['number']" is the number coming from the get a row step.
     


    ---------------------------------------------------------------------------


    If I have helped you with an answer, please accept this post as a solution and thumbs up my reply. Thanks !

    Blog - JonDoesFlow
    Twitter - JonDoesFlow
    YouTube - JonDoesFlow
  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at

    It looks like the value you provide is a decimal that comes as a string. FormatNumber needs a Number and int needs a string that can be converted to integer. Have you tried to convert the string to a decimal/float?

  • SamB2 Profile Picture
    104 on at

    Hi @Jondoesflow 

     

    I think the issue is that the Flow is not returning the Excel column value as a number, as I have just tried your suggestion and am getting the below error message:

     

    error.JPG

     

    Just for reference, this is what the action looks like (I have blocked out the column name):

     

    flow.png

  • Verified answer
    JonDoesFlow Profile Picture
    1,304 on at

    Hey, ok cool. As @Matthy79 suggests, try using the float to convert the number

     

    formatnumber(float(triggerBody()['number']),'0.00')

  • SamB2 Profile Picture
    104 on at

    @Jondoesflow @Matthy79 

     

    Thanks guys, the float function worked perfectly!

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard