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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Table Comparison

Need your help again. I’ve two tables, one is Users and the other one is Cases, so I want an expression or code that writes Inactive if the User does not have any cases in the Cases table and Active if the user has cases in the Cases table.

3 Replies
JonnyPoole
Former Employee
Former Employee

Can you screenshot your data model  showing the users and cases table and how (or if) they are linked ?

Vegar
MVP
MVP

Exists() is a good function to do this.

Try something like this.

Load

Dim1,

Dim2,

UserId

From

Cases.qvd (qvd);

Load

Username,

Exists (UserId) as _hasCase

From

Users.vad (qvd);

-Vegar

Not applicable
Author

Hi,

Try add Client as dimension into a straight table, and as a expression write something like:

=if(count(Cases)>=1,'Active','Inactive').

This works if you have linked the Client and Cases table by a key, if not, you must!