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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Float Variable Roundin...
Power Automate
Unanswered

Float Variable Rounding Down To An Integer

(0) ShareShare
ReportReport
Posted on by 119

Hi

 

I have a flow with a variable with type float. If I try to set this via computation to a value without a decimal it populates correctly. If however the result does include a decimal then it rounds down. For Example

 

div(200,100) results in 2

div(50,100) results in 0, however I want 0.5

 

Anybody know what I am doing wrong?

 

Regards

 

Jon

 

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,175 Most Valuable Professional on at
    Re: Float Variable Rounding Down To An Integer

    Hi @Jonfarmer4999,

     

    This should work:

     

    div(50.0,100.0)

     

     

    Are you retrieving whole numbers which you are inputting in your div? Otherwise you can first convert them to a float before the div.

     

    div(float(100),float(200))

     

     

    Basically one of the values needs to be of type float to get a result of type float:

    https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#div

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

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard