Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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