First, change your data Source from Database to Xpath. Then you can enter an Xpath constraint. However, this will only probably wortk as you expect if the objects have been saved. If possible, instead use the Constrained by attribute to select the chain of associations to restrict your data, like:
Hey Rachana, the Mendix Client doesn't support XPath constraints based on attributes, only based on objects ('[% currentobject%]') and associations. So it isn't possible to select: [A_B/A/att1 = [% currentobject%]/att1] Only fixed values are possible: [A_B/A/att1 = 'FixedValue']
To achieve what you want is only possible by selecting the datasource to Microflow and do a database retrieve there and then you can but constraints based on attributes. This gives some disadvantages because searching and sorting isn't possible anymore in a datagrid. Check the documentation here.
I hope this helps, good luck!