Forum Discussion

tkboisvert's avatar
tkboisvert
Helper II
4 years ago
Solved

Unexpected modulo behavior

Hi all,
 
In excel, I have this formula:
MOD(-10 + 9,12) + 1
And the expected result is 12
 
However, in PowerQuery the same formula:
Number.Mod(-10 + 9, 12) + 1
Results in 0
 
The strange thing is that for other numbers ( -1 ) I get the same result in both systems..
 
I expect this to have something to do with the nature of MOD, and how I'm using negative numbers.. But I would still like to know which is 'correct'..