Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SQL statements load script editor(Qlik sense)

Hello, Can someone help me out with understanding, how does one mimic a SQL where clause in the QLIK sense load script editor ?

Also, I am trying to use a sql query to pull some data from multiple tables using left joins followed by a where clause to capture dates in a dynamic range of 1 month going back from today. Any help is appreciated.

12 Replies
OmarBenSalem

I found it !

He have to add the 1 also before the P:

=Sum(distinct {1<User =P({1<Customer={"=Count({1}Distinct User)=2"}>} User ) >}  Counter)

ps: Gautam use this final expression; that's the correct one.

Thanks again stalwar1

Not applicable
Author

So I used the formula you guys provided above, what's happening is that it's creating a static table and filtering the user list based on the selected user does not work unless I remove the '1' that Omar mentioned, in which case it only shows the selected user.

From what I understood: the formula finds all the users that were present on Customers that had two unique users each. That is great but I would need the selection to be based on the Customer's common between the selected user and the other users.

I expanded the dataset to include more combinations.

    

UserCustomerCounter
ACus A1
BCus A1
FCus A1
CCus B1
CCus C1
DCus C1
ACus D1
BCus E1
CCus E1
FCus Z1

So in this case if I selected 'User A' the table 1 should be shown and table 2 if 'B' is;

Qlik data.PNG

So it's still looking for customers with distinct users >=2 but one of the users must be the selected user.

I appreciate all your help and sorry for causing any confusion.

Not applicable
Author

Hey guys, any luck ?