You don't need an if statement - it slows down your calculation so try to avoid it at all costs. This will give you the values that are in the month and then remove the records that have a blank or null Category value (you'll notice that I handled this by getting all category values thus excluding nulls and then also removing the empty string). I've attached an example app.