cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Michal
Advocate V
Advocate V

how to get integer value of the float number in PowerApps

Here is a very simple way to get the integer part of the float number.

Value-Mod(Value,1)

i.e. Value=1.92 in return you get 1

 

Hope it helps 

/Mike

2 REPLIES 2
Drrickryp
Super User II
Super User II

@Michal 

Round(Value,0) also works, RoundUp(Value,0) and RoundDown(Value,0) also.

Michal
Advocate V
Advocate V

Thank you @Drrickryp 
When I look at my post I might not express myself clear enough.  
Here it is. I would like to get the integer portion of the float value without rounding up or down. 
Unfortunately, round(value,0) will do rounding mathematically, which in my case was not expected. 

See below (*in the 4th example should be RoundUp). The last example shows what I wanted to achieve. I hope now it is more understandable. 

 

intiger1.pngintiger2.png

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (12,920)