Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
From the below table I need to know the number of customers that have...
1.) Bought hats in F11 and F12 and haven't bought anything else
2.) Bought Gloves in F11 and F12, but have also bought something other than Gloves in F12
3.) Bought more than 1 type of product in both F11 and F12.
On top of this I need to know for each question above how much the customers have spent on each item in each year!
Anyone any idea how to tackle this problem? Or is it beyond the scope of Qlikview?
Customer | Year | Item | Value |
---|---|---|---|
A | F11 | Hat | 10 |
D | F11 | Hat | 10 |
E | F11 | Hat | 10 |
B | F11 | Glove | 5 |
B | F11 | Glove | 5 |
C | F11 | Glove | 5 |
E | F11 | Glove | 5 |
A | F11 | Hat | 10 |
B | F11 | Glove | 5 |
C | F11 | Glove | 5 |
F | F11 | Hat | 10 |
F | F11 | Glove | 5 |
B | F12 | Hat | 10 |
B | F12 | Hat | 10 |
A | F12 | Hat | 10 |
B | F12 | Glove | 5 |
B | F12 | Scarf | 15 |
C | F12 | Glove | 5 |
E | F12 | Glove | 5 |
E | F12 | Glove | 5 |
D | F12 | Hat | 10 |
E | F12 | Glove | 5 |
C | F12 | Glove | 5 |
F | F12 | Hat | 10 |
F | F12 | Glove | 5 |
B | F12 | Scarf | 15 |
F | F12 | Scarf | 15 |
It is very much possible in QV. I will give you a hint; try Set Analysis with P().
Hi Tom
Do you want this adding to the table above? I presume you will be creating a new table, what dimensions will you be using?
Regards
Steve
Hi Steve,
I need separate formulas as the client would like the answers in stand alone text box unfortunately rather than in a table with a dimension. The table above is mock up of the data I would want to analysis.
An example of what one of the text boxes would look like is....
Previously purchased Hats only, but now buying other items
1: Customer count
2: Hat sales previous / now
3: Non Hat sales previous / now
Any help would be appreciated as it has got me stumped!
Hi Tom,
Please find the attachment.
I have done first two requirements.
Hope this helps...
-Sundar
Hi ALL
Here is the SOLUTION. See attached file.
Question #1 resolution:
<Pivot Table>
Dimension: Customer
Expression:
=Sum({<[year]={F11,F12},item={Hat}>}[value]) > 0 And
Sum({<[year]={F11,F12},item={"*"}-{Hat}>}[value]) = 0
Question #2 resolution:
<Pivot Table>
Dimension: Customer
Expression:
=Sum({<[year]={F11,F12},item={Glove}>}[value]) > 0 And
Sum({<[year]={F12},item={"*"}-{Glove}>}[value]) > 0
Question #3 resolution:
<Pivot Table>
Dimension: Customer
Expression 1:
=if( Aggr( Count({<year={F11,F12}>} DISTINCT [item]), [customer] ) > 1, 'YES', 'no (only one)')
Expression 2:
=Aggr( Count({<year={F11,F12}>} DISTINCT [item]), [customer] )
Best Regards
Evandro Segura
Brazil
Hi Sundar,
Thanks for this, it is probably going in the right direction,but doesn't quite get the answers I want. I think it needs to involve Set Analysis, but I am not sure as the same customer has to have fulfilled several criteria before being counted. For instance, "Previously purchased Hats only, but now buying other items", means the customer has to have bought Hats and nothing else in F11, and in F12 have not bought hats, but have bought other items.
Thanks for trying.