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 Automate - Building Flows
Answered

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

 

I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    32,891 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 655 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 371 Moderator

#3
chiaraalina Profile Picture

chiaraalina 276

Last 30 days Overall leaderboard