How to set visibility of text field depending on the value of reference ?

I have entities A and B . There is an association between these two – one A has multiple B . Now I have created a dataview for entity B. I want one of the attribute of entity B to be set hidden/shown depending on the on of the attribute of entity A.  But If I select option ‘based on attribute value’ for setting the attribute of entity A, it shows attributes of entity B only. i.e. no attributes of entity A are listed there. How to solve this ? 
1 answers

The easiest solution might be to use a second dataview only for this attribute and make the whole dataview visible based on the entity A attribute.

I know it’s not nice, but it works.