Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Pericator
Contributor III
Contributor III

Count in Set Analysis

Hello,

I got a table formatted like:

 

Date, CustomerID, Login

2019-05-27,  1, 1

2019-05-27, 2, 1

2019-05-27, 3, 0

2019-05-26, 1, 1

 

So I know for every Date, for every Customer if he had a Login at that day or not. What I want to do now is to show how many distinct Customers had a Login every Day in a selected TimeRange.

I tried like this:

 

count(distinct {<count(distinct DATE) = count(Login)>}customerID).  I figured out, why this doesnt work, by now. Set Analysis works as an imagined selection, so Qlik can't count an imagined Selection on multiple table rows. Is there any other solution to my problem?

I thought about building an extra table just for this metric. My problem is: The user can't custom select a TimeRange then, to count the customers, who logged in every day at the specific TimeRange.

 

Thanks for your Help in Advance

Percicator 

3 Replies
Ricardo_Gerhard
Employee
Employee

Just to understand your table structure:

Date, CustomerID, Login

2019-05-27, 1, 1

2019-05-27, 2, 1

2019-05-27, 3, 0

2019-05-27, 1, 1

Date: the first login? the last user login?

CustomerID: hope it´s the login ID of the customer.

Login: looks like a total of logins or the number of connections?

Ricardo Gerhard
OEM Solution Architect
LATAM
Pericator
Contributor III
Contributor III
Author

I got a cross table of Date and CustomerID.
So I combined every Date, lets say since 2019-01-01, with every CustomerID. And the Login is a flag, 1 for had a login, and 0 for no Login at that day by that Customer.
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I believe this will work:

=count({<CustomerID=E({<Login={0}>})>}DISTINCT CustomerID)

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com