Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show fields based on exists condition

Hi,

I am attempting to create a table in which a user will appear but only if certain values do not exist against the users ID. In total there are 4 values that I want to make sure don't exist against the user

I have tried using if(not exists(STATUS, 'ACTIVE') and if(not exists(STATUS, 'REACTIVATED'), USER_ID), but my table shows nothing. I presume that I am writing this out the wrong way.

Can anyone please help with this?

Thanks

3 Replies
RSvebeck
Specialist
Specialist

Hi.

Do you mean like this (see attached)

//Robert Svebeck

Svebeck Consulting AB
Not applicable
Author

Hi Robert,

Something similiar to that.  For example:

Say User A - contained Apples and User A also contained Bananas.  Whereas User B only had apples.

I want to show the Users that ONLY have Apples.

So it would be something like if( not exists, 'Bananas', UserID). So in my table it would only show User B.

From your example, I believe it would show User A and User B.

RSvebeck
Specialist
Specialist

It is possible to solve this with "count".


First you count total number of records for the dimension, and then count the number of records with apples for the dimension.

-> Then you will know if the data contains only apples by subtracting the differens in count.


But I seriously doubt that this is the "best solution".


It would be very interesting if someone can provide a better solition. See attached simplified example of my count solution...


// Robert Svebeck

Svebeck Consulting AB