Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
MMCGLAESASAA
Contributor III
Contributor III

Count Unique time and user

Hi All,

Hope all is doing great.

I came across a scenario where i need your help.

I need to count Total unique times that any user has witout entering a paid Contest Exactily that may days( no more no less).

Example :- If a user enters a paid contest, then does not enter a paid contest for Exactly between 24-48 hours, that would be counted as 1 day. if they enter a paid contest, then don't enter one for Exactly between 72-96 hours, that would be counted as 3 day.we will be counting EACH and EVERY unique time this happens for every single User.

i attached the data set.

Hope this group will help.

Thanks
Ravi

Labels (5)
4 Replies
MMCGLAESASAA
Contributor III
Contributor III
Author

Hi All,

Do anyone know how can i resolve the above scenario?

 

Thanks

mercerisms

vinieme12
Champion III
Champion III

which of the two fields specify  " If a user enters a paid contest" ?

can you you also post expected output for the attached sample?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable

From how much i am able to understand, try this:

A:
Load * from (Date Source)
where len(cash_bet)>0 or len(winnings_bet)>0 ;
Noconcatenate
MainTable:
Load * from (Date Source);
Inner Join
B:
load *, if(user_id=previos(user_id),floor(num(Previous(created)-created)),null()) as number_of_days
resident A order by user_id asc, created desc;

Drop Table A;

Akash Dhandhi
Please accept it as a solution, if it solves your issue.