HI,guys, i've got a problem with case statement in my cds view.
I try to delete decimal part, but only if it's eqals to 0.
field1 here's intitializes with floor(Menge).
Here's my code. (It's work, values with decimal part which eqals 0 get floor(Menge) value,values with decimal part NOT equals 0, get 0 value. But when i tru to replace "else 0", with "else Menge" all values get Menge value. Why
it's works like this. And what i need to do to remove decimal part if it eqals to 0. So first img is with "else 0",second
with "else Menge".


case
when field1 = Menge then floor(Menge)
else 0
end as field2