Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to handle Date

Please find the attached application.

Description:

========

Basically its a game scenario where each Game has a duration of  28 days.

UID: User ID

GID: Game ID

PID: Player ID

G_ST_DT: Game Start Date

G_ED_DT: Game End Date

Requirement:

=========

I need a new column which tells me about  number of Games Repeat  by the user.

I tried to solve it by still getting problems,so, if anyone could help me that would be great ...

1 Solution

Accepted Solutions
IAMDV
Luminary Alumni
Luminary Alumni

Is this resolved? Managed to get it to work? If yes, please mark the correct answer as answered.

Thanks,

DV

View solution in original post

8 Replies
IAMDV
Luminary Alumni
Luminary Alumni

Hi,

Not quite understood your question. What is the field for user? Is it UID? and what is the link between two tables. Can you tell the answer for your question based on your Excel example? I mean expected results for a specific User and we can get this working in QlikView.

Thanks,

DV

www.QlikShare.com

Not applicable
Author

yes UID is for User, Discard the second table (i.e: Repeat) i just used as a result for testing purpose.

Just focus on Temp1 ..

Considering Excel Example: There is a User having an UID : 1 , user 1 involved in 5 games G1,G2,G3,G4,G5

on diferent dates (as you can see from the dates Game Star Date And Game End Date)

I just want to find out that how many games that the User 1 has repeat after played first game

IAMDV
Luminary Alumni
Luminary Alumni

Gotcha! So from your example UID played 4 games and the result should be 4 or what is the expected result here?

Thanks,

DV

www.QlikShare.com

IAMDV
Luminary Alumni
Luminary Alumni

Not sure if I'm missing something but it should be straightforward expression...

IF(Count({1} UID) >= 1, Count({1} UID) -1, 0)

Please see the attachment and it give 4. Also, I'm using the {1} to ignore all the seleciton and count full set.

Thanks,

DV

www.QlikShare.com

Not applicable
Author

thnks

IAMDV
Luminary Alumni
Luminary Alumni

Is this what you need?

Thanks,

DV

renjithpl
Specialist
Specialist

I have not understood your questions,

but is it something like this which you are looking for

 

Game:

LOAD UID,

     GID,

     PID,

     date(G_ST_DT, 'DD/MM/YYYY') as GameStartDate,

     date(G_ED_DT, 'DD/MM/YYYY') as GameEndDate,

     num((G_ED_DT-G_ST_DT)) as duration,

     if(num((G_ED_DT-G_ST_DT)) /28 >1, 'Repeated', 'Not repeated') as RepeatStatus

FROM

[qlikview examples try\test(1).xlsx];

regards

Renjith

IAMDV
Luminary Alumni
Luminary Alumni

Is this resolved? Managed to get it to work? If yes, please mark the correct answer as answered.

Thanks,

DV