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