Forum Discussion
ckurir
4 years agoFrequent Visitor
Int64.From is rounding numbers, not taking just the integer part
I have a problem using Int64.From. I just wants the integer part of a number If I have the number 4.8 it always give me "5", no matter which RoundingMode I use Int64.From(4.8,null,Roundingmode.Down...
- 4 years ago
Hello! Please try this:
Number.RoundDown ( 4.8 )
jennratten
Super User
4 years agoHello! Please try this:
Number.RoundDown ( 4.8 )
- ckurir4 years agoFrequent Visitor
Thanks a lot,
I am relatively new to power query, but in many other programming languages INT means just taking the integer value, not rounding off. I do not understand why power query both have rounding functions and also use INT for rounding.
- AlexisOlson4 years ago
Super User
It is a bit unusual but one difference is that Int64.From can take text as input as well whereas Number.RoundDown("4.8") will throw an error.