Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Karthick30
Creator
Creator

Count based on Filter selections

Hi,

 I have 3 Columns. ID, Location and Location 1. Location column has all US Cities and Location 1 has all NON US Cities.

Added Location and Location 1 in Filters. Count(ID's) as KPI.

Sample Dataset

Karthick30_0-1658811635178.png

If I select Austin in Location and Australia in Location 1, My KPI showing as 2. since KKK25 for Austin and XXX29 for Australia. its showing 2.

Now the requirement is, my KPI has to show 0 with above selection. because KPI value needs to show based on same field selection in Location and Location 1 filters. If I select Miami in Location and Miami in Location1, then my KPI has to show 1. since HHH89 exists in both the filter.

Any way to achieve this please

Labels (4)
2 Replies
Or
MVP
MVP

When using Qlik's default behavior for loading this table, you won't even be able to select Austin in Location and Australia in Location1, as these selections contradict. Trying to select Australia in Location1 after selecting Austin in Location will override the original selection and leave you with only Australia selected. Qlik will show you this is the case by showing Australia as dark gray (excluded). As such, I'm not sure what exactly you're doing, but it appears it doesn't match the sample dataset you provided:

Load * INLINE [
ID, Location, Location1
1, Austin, Mexico
2, Chicago, Australia
3, LA, Poland
4, Miami, Miami
];

Or_0-1658823189683.png

 

 

 

fallenangel6
Creator
Creator

Qlik's default behavior wont permit such a selection. if you are trying to find the ID that has both location 1 and location as same value then it can be done using a simple if condition.

fallenangel6_0-1658827964745.png