Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Maybe use an expression something like
If ( Count(UserID) > 1 , 1 , 0 )
This is not working.
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);
maybe this:
count( distinct UserID+ComeDate )