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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
baarathi
Creator III
Creator III

set analysis

Have a scenario such that, I want calculate the count(user) with restrictions such that, if the user comes to same place twice in a day the count of visit is 1, also if the user visit in two different cities in same day, the visit count is 1.

4 Replies
Anonymous
Not applicable

Maybe use an expression something like

     If ( Count(UserID) > 1 , 1 , 0 )

baarathi
Creator III
Creator III
Author

This is not working.

ChennaiahNallani
Creator III
Creator III

try like this

Table1:

LOAD

    ID,

    "UserID",

    Name,

    Date(ComeDate),

    City,

    Dnumber,

    CityID,

     if(CityID = CityID and ComeDate = ComeDate,1,

    if(CityID <> CityID and ComeDate = ComeDate,1,0)) as CountVisits

FROM [lib://cc/Sample45.xlsx]

(ooxml, embedded labels, table is Sheet1);

Table2:

LOAD

    IID,

    "UserID",

    "Type",

    Type2,

    "Class"

FROM [lib://cc/Sample45.xlsx]

(ooxml, embedded labels, table is Sheet2);

agigliotti
MVP
MVP

maybe this:

count( distinct UserID+ComeDate )

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it