Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
In our qlikview i know how to use Indirect set analysis like P(),E() functions.
for example i want show how are purchased Shoes
for that i will use P() condition
sum({<customer=P(Product={'shoes'}customer)>}sales) (This is give the who are purchased shoes)
sum({<Product={'shoes'}>}sales) (this will also give same result)
why should we go for
sum({<customer=P(Product={'shoes'}customer)>}sales)
why not this
sum({<Product={'shoes'}>}sales)
Product | Customer | sales |
Shoes | Madhu | 1500 |
W.M | Madhu | 8000 |
T.V | Madhu | 25000 |
Laptop | Madhu | 50000 |
W.M | Ravi | 15000 |
T.V | Ravi | 27000 |
Laptop | Ravi | 70000 |
Shoes | Raja | 4200 |
W.M | Raja | 17000 |
T.V | Raja | 32000 |
Laptop | Raja | 1000000 |
see the difference below, based on your data
1) sum({<Product={'shoes'}>}sales)
Returns the sales of customer who bought only one Product='Shoes'
2) sum({<customer=P({<Product={'shoes'}>}customer)>}sales)
Returns the total sales of customer who ever bought Product='Shoes'
P({<Product={'shoes'}>}customer) gives list of customer who bought Product Shoes
So for each row for that list of customers, customer=P({<Product={'shoes'}>}customer) condition satisfies and gives sum of sales for all products associated with that customer
So based on requirement you can choose your expression
If you want sales of individual product then go for 1st expression
If you want sales of all product of customer who bought shoes go for 2nd expression
Here my Question is At
what situation will go for Indirect Set analysis ?
Hello, Mahesh!
It can be used for instance when you use an alter states. QV help tells us this example:
count({$<[Invoice Number] = p({State1} [Invoice Number]) * p({State2} [Invoice Number])>} DISTINCT [Invoice Number])
This means an intersection of two possible states.
It can be used in different situations like show to user a couple of values depend on current selection.
Not clear.
see the difference below, based on your data
1) sum({<Product={'shoes'}>}sales)
Returns the sales of customer who bought only one Product='Shoes'
2) sum({<customer=P({<Product={'shoes'}>}customer)>}sales)
Returns the total sales of customer who ever bought Product='Shoes'
P({<Product={'shoes'}>}customer) gives list of customer who bought Product Shoes
So for each row for that list of customers, customer=P({<Product={'shoes'}>}customer) condition satisfies and gives sum of sales for all products associated with that customer
So based on requirement you can choose your expression
If you want sales of individual product then go for 1st expression
If you want sales of all product of customer who bought shoes go for 2nd expression