Filtering out data in a Dimension

Hey guys,

I'm currently trying to make some charts where the only dimension is selected Account Numbers. For example, without even filtering any data I want to display a bar chart which continually shows 5 out of the 100 Account Numbers.

I've managed to do that so far with If statements:

If([Account Code] = 'value', 'value',

If([Account Code] = 'value', 'value',

If([Account Code] = 'value', 'value',

If([Account Code] = 'value','value',

If([Account Code] = 'value', 'value',

0)))))

Which is working well, however my problem is that I want to exclude any data that goes into the '0' so on my bar chart the 0 doesn't even appear, and instead it's only the 5 Account Numbers.