Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Alternate State Issue

Hi,

Need your help.

I have the following table:

 

KarthickMuthuCAR100
VeniThangamTV200
SudheepSuthanTOY300
AnandMuthuSHOE400
SuriyaThangamCAR500
GaneshSuthanTV600
KarthickMuthuTOY700
VeniThangamSHOE800
SudheepSuthanCAR900
AnandMuthuTV1000
SuriyaThangamTOY1100
GaneshSuthanSHOE1200

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

20 Replies
Highlighted
Specialist
Specialist

Can you share the sample app?

Regards,

Mayank

Highlighted
Specialist
Specialist

Try this one.

sum( {$<Customer = P({<Product={'CAR'}>}Customer)>}Sales).

Highlighted
Master III
Master III

Hi,

try

sum( {$<Supplier = P({<Product={'CAR'}>}Supplier)>}Sales)

Highlighted
Champion
Champion

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??

Highlighted

I would just do like this:

=Sum({$<Supplier = P({<Product={'CAR'}>})>}Sales)

Highlighted
Specialist III
Specialist III

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!

Highlighted
Contributor II
Contributor II

Hi karthick01

Please try this.

=Sum( {$<Supplier = P({<Product={'CAR'}>}Supplier)>}Sales )

Highlighted
Contributor III
Contributor III

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?

Highlighted
Contributor III
Contributor III

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.