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

3 REPLIES 3
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

Piotr-Pruszkow
New Member

Great! Thanks

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (6,889)