Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
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.