Hi,
In this data 'Directorate From' is linked to a separate hierarchy table against a field called Directorate. Directorate is a field users can filter by in the app. I want to create a calculation so that when 'Dir A', for example, is selected, a count of matching values in the 'Directorate To'. However this should only be when 'Directorate From' doesn't equal 'Directorate To'. In the example below, the answer would be 2 (as highlighted) and not 3.
The calculation would go in a straight table.
![Capture.JPG Capture.JPG](https://community.qlik.com/t5/image/serverpage/image-id/170129iAEE66F1863254E7E/image-size/large?v=v2&px=999)
I hope that makes sense.
Thank you.