You are comparing two variables, but you can only compare variables with xPath elements.
Something like: [dishname = $Menu/dishname]
In a dataview you do not have the source Xpath. So i guess you are constructing a Dataview in which you have two containers. The first container should have the visibility constraint that two entities attributes are the same, the second container should have the constraint that they are different.
[$Grade_Entity.dishname = $Menu.dishname]
When looking at your Xpath, I assume you want to compare a the attributes of the Entity called "Entity" (you should change the association name and possibly the entity to a normal name), with an attribute of the Menu entity. All this is done in the dataview of the Grade entity.
Your Xpaths should look something like this:
[$Grade_Entity/Entity/dishname = $Grade_Menu/Menu/dishname]
Best is to provide us with a picture of your Datamodel