Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

basket analysis -add condition on filtering criteria

I have the following sample data , the presence of invoiceid, and flag=0 indicates the item has been sold

Session IDInvoiceIDItemIDCategoryFlagsession_start
11112219E02017-01-01 11:30:30
11112220DL02017-01-01 11:30:31
11112221JL02017-01-01 11:30:32
1111222JL12017-01-01 11:30:33
1111223Q12017-01-01 11:30:34
1111224W12017-01-01 11:30:35
2222213DB12017-01-01 11:30:30
2222211DL12017-01-01 11:30:31
2222212DL12017-01-01 11:30:32
2222219DE12017-01-01 11:30:33
2222220E12017-01-01 11:30:34
2222221JL12017-01-01 11:30:35
2222222JL12017-01-01 11:30:36
3333213DB12017-01-01 11:30:31
3333211DE12017-01-01 11:30:32
3333212DL12017-01-01 11:30:33
3333219DL12017-01-01 11:30:34
3333220E12017-01-01 11:30:35
3333221JL12017-01-01 11:30:36
3620218E12017-01-01 11:30:30
36201213DB02017-01-01 11:30:31
36201214DB02017-01-01 11:30:32
36201211DL02017-01-01 11:30:33
36201212DL02017-01-01 11:30:34
3620216Q12017-01-01 11:30:35
3620217Q12017-01-01 11:30:36
36201215W02017-01-01 11:30:37
44443213DB02017-01-01 11:30:30
4444218E12017-01-01 11:30:31
5555218E12017-01-01 11:30:40
55554267Q02017-01-01 11:30:36

i have a test QlikView file (see attached) that when selected a Category on the List box, the bar chart shows the no. of time each category have been on the same session id of the selected category, but have not sold at that session id.

E.g., when i select Q, Q have been on session 1111 and 3620, on both session, Q have not been sold, so we count 1 when a category is sold at a session.   

2.jpeg

I would like to achieve the following, e.g.

When i select E, it filters out those sessions with E have the min(session_start) for the session ID, with the above data, it would filter out session 1111, and 3620,...then only at session 3620, E have not been sold, then it counts 1 for each category that is sold at the session, the result should be below when select E.

CategoryNo. of session
DB1
DL1
W1
1 Solution

Accepted Solutions
sunny_talwar

1 Reply
sunny_talwar