Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
View all the Fabric Data Days sessions on demand. View schedule
This article gives a formula to generate integer random numbers in Power Query Language M.
Use Case: There are many scenarios where we are required to extract the integer portion of a number.
Hence, for 23.57 and for -45.678, the integer portions will be 23 and -45 respectively.
Power Query Number functions library doesn't provide any function which can do this. Hence, we will work out a formula to make a Number.Int function.