If you only want to calculate a number if "Wert" is equal to 1,2,3,4,6,8,12,16, or 24, make a case statement and wire "Wert" to the selector. For one case, type 1..4,6,8,12,16,24. Inside this case, place the formula node. The other case should have a value of 0 and should be the default case. Inside this case, just place a zero constant. Doing a 1 x 0 multiplication to have a result of 0 is just a waste. I've attached a new picture that shows what I mean. I converted the "Wert" value to an integer because making equality comparisons with floating point numbers should always be avoided. If you do any kind of calculation of "Wert", because of the inexact conversion of floating point numbers to binary, what you think is
3.0, might actually be 3.000000001.