Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count values that match the selected value in an different column

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

I hope that makes sense.

Thank you.

Labels (1)
1 Reply
morgankejerhag
Partner - Creator III
Partner - Creator III

Is the user making a selection on [Directorate To] or another field?

If the selection is made in [Directorate To] we could maybe do something like the total count - the count of equals

count([Directorate To])-count({<[Directorate From]={"$(=maxstring([Directorate To]))"}>} [Directorate To])