Number.Mod doesn't return that same than it's corrsponding functions in Excel and DAX when negative numbers are involved. I find this really bad.
(number, divisor) => if number>0 then number-Number.RoundDown(number/divisor,0) else Number.Abs(divisor)+number
I can repro the same issue as you. I’ve reported it internally to Power BI Team: CRI 46952686I’ll post here once I get any update about it.
I’ve got response from the Product Team.
We do not intend M to copy either Excel or DAX semantics. M has its own semantics and the current behavior is by design.