Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following sample data , the presence of invoiceid, and flag=0 indicates the item has been sold
Session ID | InvoiceID | ItemID | Category | Flag | session_start |
---|---|---|---|---|---|
1111 | 2 | 219 | E | 0 | 2017-01-01 11:30:30 |
1111 | 2 | 220 | DL | 0 | 2017-01-01 11:30:31 |
1111 | 2 | 221 | JL | 0 | 2017-01-01 11:30:32 |
1111 | 222 | JL | 1 | 2017-01-01 11:30:33 | |
1111 | 223 | Q | 1 | 2017-01-01 11:30:34 | |
1111 | 224 | W | 1 | 2017-01-01 11:30:35 | |
2222 | 213 | DB | 1 | 2017-01-01 11:30:30 | |
2222 | 211 | DL | 1 | 2017-01-01 11:30:31 | |
2222 | 212 | DL | 1 | 2017-01-01 11:30:32 | |
2222 | 219 | DE | 1 | 2017-01-01 11:30:33 | |
2222 | 220 | E | 1 | 2017-01-01 11:30:34 | |
2222 | 221 | JL | 1 | 2017-01-01 11:30:35 | |
2222 | 222 | JL | 1 | 2017-01-01 11:30:36 | |
3333 | 213 | DB | 1 | 2017-01-01 11:30:31 | |
3333 | 211 | DE | 1 | 2017-01-01 11:30:32 | |
3333 | 212 | DL | 1 | 2017-01-01 11:30:33 | |
3333 | 219 | DL | 1 | 2017-01-01 11:30:34 | |
3333 | 220 | E | 1 | 2017-01-01 11:30:35 | |
3333 | 221 | JL | 1 | 2017-01-01 11:30:36 | |
3620 | 218 | E | 1 | 2017-01-01 11:30:30 | |
3620 | 1 | 213 | DB | 0 | 2017-01-01 11:30:31 |
3620 | 1 | 214 | DB | 0 | 2017-01-01 11:30:32 |
3620 | 1 | 211 | DL | 0 | 2017-01-01 11:30:33 |
3620 | 1 | 212 | DL | 0 | 2017-01-01 11:30:34 |
3620 | 216 | Q | 1 | 2017-01-01 11:30:35 | |
3620 | 217 | Q | 1 | 2017-01-01 11:30:36 | |
3620 | 1 | 215 | W | 0 | 2017-01-01 11:30:37 |
4444 | 3 | 213 | DB | 0 | 2017-01-01 11:30:30 |
4444 | 218 | E | 1 | 2017-01-01 11:30:31 | |
5555 | 218 | E | 1 | 2017-01-01 11:30:40 | |
5555 | 4 | 267 | Q | 0 | 2017-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.
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.
Category | No. of session |
---|---|
DB | 1 |
DL | 1 |
W | 1 |
Check my response here:
P() function - filter out sessions with min. session start time
Check my response here:
P() function - filter out sessions with min. session start time