cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Michal
Kudo Collector
Kudo Collector

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
Super User

@Michal 

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

Michal
Kudo Collector
Kudo Collector

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
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (3,159)