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

How to LOAD attribute boolean values

Hi,

I am trying to create a table in QlikView, using attributes from an SQL database.

The table in the database is composed of "Boolean" values, which are shown as either "0" or "1".

I want to load, for example, only those data which have a value of TRUE  (meaning :  "1")

Here is my load script :

Customers :

LOAD

  personHasEmail,

  (personHasEmail = '1') as Email_YES

(Meaning :  ALL data, where the person has an email, will be taken from the database)

And, in QlikView, I have the following expressions :

Count (CustomerID)

Count(Email_YES)

(Each customer has a unique ID.  So, "Count CustomerID" will produce the total number of people in the database)

And, "Count(Email_YES") should display ONLY those people who have email addresses.

But, this is not working; 

Both expressions are displaying the TOTAL number of customers; 

Obviously, the Count(Email_YES) expression is not working. Instead of counting only those people with emails, it's counting everyone.

Any help would be greatly appreciated.

10 Replies
Not applicable
Author

Thank you Gabriel.

Actually, I realized my mistake : I should have left my original script the way it was..............just as Gabriel mentioned.

But, instead of trying to create a multi-table (which is what I was doing),  I should have simply created two separate tables :  one for Customers, and one for Emails.............and then cross-reference both counts into a THIRD table

This solved my problem

Thanks all for your helpful responses