Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Help!!
I have the sample data like below, I want to do a basket analysis, e.g. when I select an category on an list box(e.g. DL) the graph would show the associate category that is in the same session id, but without invoice id (in terms of no. of time of session)
Session ID | InvoiceID | ItemID | Category |
---|---|---|---|
3620 | 1 | 211 | DL |
3620 | 1 | 212 | DL |
3620 | 1 | 213 | DB |
3620 | 1 | 214 | DB |
3620 | 1 | 215 | W |
3620 | 216 | Q | |
3620 | 217 | Q | |
3620 | 218 | E | |
1111 | 2 | 219 | DL |
1111 | 2 | 220 | E |
1111 | 2 | 221 | JL |
1111 | 222 | JL | |
1111 | 223 | Q | |
1111 | 224 | W |
for example, when I select DL on a list box,The result should be below, how can I achieve below with what dimension and expression??? Many Thanks for help.
Category | No. of session |
---|---|
Q | 2 |
E | 1 |
W | 1 |
I have attached the qvw for you here
Re: Market Basket-find associate items not on same orders but on same session
Why is JL not included? DL is in Session ID 1111 also, so it should be included in the chart? If it does, try this
Hi, Sunny,
Thanks for your reply,
Yes, JL should be included, the result should be below when I choose DL, however, the attached qvw only show me all the rows with DL be the category.
Category | No. of session |
---|---|
Q | 2 (been in both 3620 and 1111) |
E | 1(been in both 3620 and 1111) |
W | 1(been in 1111) |
JL | 1(been in 1111) |
what i want is , e.g. in session 3620, when i choose DL, it gives me Q and E, which are in the same sessionid, but without invoice id..
can you advice how to do that?
From what you mentioned, isn't this what you wanted?
When DL is selected in Category
When DL is selected in Category and Session ID 3620 is selected
Isn't this what you wanted?
Yes, Sunny,
that is the result i want! can you tell me how to do the expression?
I have attached the qvw for you here
Re: Market Basket-find associate items not on same orders but on same session
Thanks!!! problem solved!
hi Sunny, i have another problem, how can i achieve, e.g, when i select an category with invoice id( e.g., E), the graphs count the session id of each category that have no invoice id? with the above sample data, the result should be :
Category | No. of session |
---|---|
JL | 1 |
Q | 1 |
W | 1 |
Hello Sunny,
=Count(DISTINCT{<Category = p({<Category, [Session ID] = p([Session ID]), Flag = {1}>}), Flag = {1}>}[Session ID])
Could you please explain how it works and what is the use of Flag here?
I am sorry, but I am confused about why is E not included in the desired output? Session ID 3620 have E without any InvoiceID, shouldn't that be included also?