Number.Mod Function of Power Query
The Number.Mod function divides two numbers and returns the remainder of the resulting number.
Syntax
Number.Mod(number as nullable number, divisor as nullable number, optional precision as nullable number) as nullable number
Example:
Power Query M
let MyTable = Table.FromRecords( { [CustomerID = 1, Name = "Ashish", Marks = 568, Total= 700], [CustomerID = 2, Name = "Katrina", Marks = 655, Total= 700], [CustomerID = 3, Name = "Alia", Marks = 380, Total= 700], [CustomerID = 4, Name = "Vicky", Marks = 458, Total= 700], [CustomerID = 5, Name = "Mohini", Marks = 278, Total= 700], [CustomerID = 6, Name = "Meenakshi", Marks = 289, Total= 700], [CustomerID = 7, Name = "Esha", Marks = 675, Total= 700], [CustomerID = 8, Name = "Anjali", Marks = 380, Total= 700] } ), return = Table.AddColumn(MyTable, "Mod of a Number", (_) => Number.Mod(_[Total], _[Marks])) in return
The output of the above code is shown below: