Hi and welcome to the forum.
You ahve to be more specific as what you clasify as bad data. In some cases values that show negative can be clasified as bad data, and in other cases it could be an actual state like "Calc Failed", "Bad"....
Keep in mind that when you do a calculated data of a float point, string or states will be excluded from the calculation. You can't add 10 and "Bad".
You can use the filter expression option in calculated data to "filter your data:
('TAGNAME')>0
('TAGNAME')<>"Bad"
('TAGNAME')<>"Bad" and ('TAGNAME')<>"Failed"
It all depends on your clasification of "bad" data.