not Select elements that either don't have the specified attribute, or do have the specified attribute but not with a certain value.
if i understand you correctly this will help you
$(".tags li").on("click", function() {
var catid = $(this).data("catid");
$("[data-category=" + catid + "]").show();
$("[data-category]").not("[data-category=" + catid + "]").hide();
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<ul class="tags">
<li data-catid="1">Category 1</li>
<li data-catid="2"> Category 2</li>
</ul>
<div data-category="1">
Category 1 Item
</div>
<div data-category="1">
Category 1 Item
</div>
<div data-category="2">
Category 2 Item
</div>
$(".tags li").not("[data-category="+ catid + "]").show();?