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 Automate
Unanswered

Round decimal figures

(0) ShareShare
ReportReport
Posted on by

Hi all, 

 

In Sharepoint I have a calculated column for number of days left to do an operation. Flow sees it as a string. How do I round that number to integer with a 'select' action?


Thanks for assisting. 

 

Capture.PNG

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    on at

    Hi @Anonymous,

     

    You could try to convert it by using the int() function.

    Like:int(Dynamic content)

     

    75.PNG

    Please take a try.

     

    Best Regards,

    Barry

  • Community Power Platform Member Profile Picture
    on at

    Hi @v-bacao-msft

     

    thanks for the suggestion. Here is the error I get:

     

    InvalidTemplate. The execution of template action 'Select' failed: The evaluation of 'query' action 'where' expression '{ "DaysLeft": "@item()['DaysLeft']", "DaysLeftRounded": "@int(item()['DaysLeft'])" }' failed: 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

     

    There is this thread with more details, I inadvertently created another request. 

  • Wilhelm Profile Picture
    34 on at

    I'd select it as is, and then compose it into an integer.

    Here's a recipe I use to round numbers - you'll notice I change the number to a string, then split on the decimal point, and then turn it back into an integer. (You won't need the multiply and divide by 100.)

    The value I'm rounding is varMonthlyAmount.

    I'm rounding to two decimal places, hence multiply and divide by 100.

     

    div(int(first(split(string(add(mul(variables('varMonthlyAmount'),float(100)),0.5)),'.'))),float(100))

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 378 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 273 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 135 Most Valuable Professional

Last 30 days Overall leaderboard