I'm working on math where
if [Running Sum] >[sch-work] then (if [sch-work] = 0 then [Running Sum] else Number.Mod([Running Sum],[#"sch-work"])) else 0),
I tried by this below formula
IF [Running Sum] >[sch-work]
THEN
If [sch-work] = 0 THEN [Running Sum]
ELSE Mod([Running Sum],[sch-work]) ENDIF
ELSE 0 ENDIF
But I didn't got the expected output
If possible can you help with the workflow or logic to be used
Solved! Go to Solution.
I'm fairly sure mod returns an integer. So all of those are going to be rounded to zero. You can test this by adding a number greater than 7 and seeing that the result is 1.
if you want to get the mod of that try this:
[Running Sum]-(floor([Running Sum]/[sch-work])*6)
Yes it is rounding to 0.
But is there any luck to get the double (type) output same as excel
see my formula above - I'd use that as a workaround.
this is what R says about Modulo btw:
Error in mod(6.11116, 6) :
Arguments 'n', 'm' must be integers or vectors of integers.
Check out my solution!