Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Need your help.
I have the following table:
Karthick | Muthu | CAR | 100 |
Veni | Thangam | TV | 200 |
Sudheep | Suthan | TOY | 300 |
Anand | Muthu | SHOE | 400 |
Suriya | Thangam | CAR | 500 |
Ganesh | Suthan | TV | 600 |
Karthick | Muthu | TOY | 700 |
Veni | Thangam | SHOE | 800 |
Sudheep | Suthan | CAR | 900 |
Anand | Muthu | TV | 1000 |
Suriya | Thangam | TOY | 1100 |
Ganesh | Suthan | SHOE | 1200 |
Also, i have the following expression:
=sum( {$<Customer = P({<Product={'CAR'}>}Supplier)>}Sales). But I am getting a value of zero for this. Why I am getting zero for this?
My expectation is 7800 (because CAR is associated with Three Suppliers (Muthu,Thangam and Suthan and those suppliers are associated to all the Customers)
Thanks,
Karthick S
Can you share the sample app?
Regards,
Mayank
Try this one.
sum( {$<Customer = P({<Product={'CAR'}>}Customer)>}Sales).
Hi,
try
sum( {$<Supplier = P({<Product={'CAR'}>}Supplier)>}Sales)
Also, i have the following expression:
=sum( {$<Customer = P({<Product={'CAR'}>}Supplier)>}Sales). But I am getting a value of zero for this. Why I am getting zero for this?
You are comparing Customer with Supplier, how this will work??
I would just do like this:
=Sum({$<Supplier = P({<Product={'CAR'}>})>}Sales)
Hi Karthick:
Try this expression
=sum( {$<Customer = P({<Supplier = P({<Product={'CAR'}>}Supplier)>}Customer)>}Sales)
It calculates the suppliers that have sold CAR product, and the customers that have purchased to the Suppliers who have sold a car.
Regards!
Hi Balraj,
I have taken the below expression from Qlikview reference manual:
sum( {$<Customer = P({1<Product={'Shoe'}>} Supplier)>}
Sales ) and the explanation is:
returns the sales for current selection, but only those customers
that ever have supplied the product ‘Shoe’. The ele372
ment function P( ) here returns a list of possible suppliers;
those that are implied by the selection ‘Shoe’ in the field
Product. The list of suppliers is then used as a selection in
the field Customer.
I am trying to execute the same thing. How does this work then?
Sunny,
I have taken the below expression from Qlikview reference manual:
sum( {$<Customer = P({1<Product={'Shoe'}>} Supplier)>}
Sales ) and the explanation is:
returns the sales for current selection, but only those customers
that ever have supplied the product ‘Shoe’. The ele372
ment function P( ) here returns a list of possible suppliers;
those that are implied by the selection ‘Shoe’ in the field
Product. The list of suppliers is then used as a selection in
the field Customer.
I am trying to execute the same thing and thats why I am not understanding why I am getting 0.