You can put the condition in the formula like you ...
# inventory
m
You can put the condition in the formula like you have done (expect it should probably be
ELSE NULL END
)