Skip to main content
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
Partner - Champion
Partner - Champion

maybe this:

count( distinct UserID+ComeDate )