0 Kudos

Number.Mod Bug

Status: Accepted
by ImkeF Super Contributor on ‎09-09-2017 07:47 AM

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.

Please change.

 

Current workaround:

(number, divisor) => if number>0 then number-Number.RoundDown(number/divisor,0) else Number.Abs(divisor)+number
Status: Accepted
Comments
by v-haibl-msft Super Contributor
on ‎09-11-2017 11:33 PM

@ImkeF

 

I can repro the same issue as you. I’ve reported it internally to Power BI Team: CRI 46952686
I’ll post here once I get any update about it.

 

Best Regards,
Herbert

by Moderator Vicky_Song
on ‎09-11-2017 11:34 PM
Status changed to: Accepted
 
by v-haibl-msft Super Contributor
on ‎09-12-2017 06:56 PM

@ImkeF

 

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.

 

Best Regards,
Herbert