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 / How to subtract a numb...
Power Automate
Unanswered

How to subtract a number with 1 decimal place

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

 

I'm trying to subtract an MS Form submission value from a SharePoint list item value. This works well using the following expression in a compose operation with a whole number:

 

sub(int(outputs('Get_Item')?['body/RemainingDays']),int(outputs('Get_response_details')?['body/rbc6d3eaefe164d4daafd160f4304ac64']))

 

However, if my 'Get_response_details' value is 0.5 the flow fails. This is a valid scenario as I am calculating days and this would be a half-day.

 

RecTechUK_0-1653562688468.png

How can I change this to allow it to accept 1 decimal place?

 

Thanks in advance for any advice.

Categories:
I have the same question (0)
  • MayankP Profile Picture
    464 on at

    Hi @Anonymous 

     

    how about create variable of type float and store response of this expression inside that variable first before using it ...

     

    hope this helps..

  • RTW Profile Picture
    180 on at

    When you use INT() it converts the number to an integer. A whole number. For decimals you'd have to use FLOAT() instead. Change your formula to this and it should work.

    sub(float(outputs('Get_Item')?['body/RemainingDays']),float(outputs('Get_response_details')?['body/rbc6d3eaefe164d4daafd160f4304ac64'])

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard