Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Tino
Contributor III
Contributor III

Get all material IDs of all salesorders containing a specific material ID

Hi Qlik Community,

i'm struggling with the following requirement.

I have a straight table with salesorder-id, material-id and quantity.

The requested feature is to select a material-id and to show which other material-IDs have been sold together with the selected material-ID over all salesorders, the sum of the sold units per material-ID and the appropriate salesorder-id. In the result the selected material-ID should be ignored.

So in other words. Search all salesorders with the selected material-ID, gather the additional material-ids sold with the selected salesorders and show the sum of the quantity.

Any ideas how to achieve this?

Thanks!

Tino

 

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Set Functions P() and E() are your friends here.

Sum(quantity)  // for current material-id selection

Sum({<[material-id]=>}quantity)  // ignoring material-id selection

Sum({<[salesorder-id]=P([salesorder-id]), [material-id]=>}quantity)  //All material ids for all currently associated salesorder-id

Sum({<[salesorder-id]=P([salesorder-id]), [material-id]=E([material-id])>}quantity)  // all currently associatedsalesorder-id, excluding selected material-ids

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

 

View solution in original post

3 Replies
Channa
Specialist III
Specialist III

1-$

 

try this in set analysis

it will remove Selected from All values

Channa
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Set Functions P() and E() are your friends here.

Sum(quantity)  // for current material-id selection

Sum({<[material-id]=>}quantity)  // ignoring material-id selection

Sum({<[salesorder-id]=P([salesorder-id]), [material-id]=>}quantity)  //All material ids for all currently associated salesorder-id

Sum({<[salesorder-id]=P([salesorder-id]), [material-id]=E([material-id])>}quantity)  // all currently associatedsalesorder-id, excluding selected material-ids

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

 

Tino
Contributor III
Contributor III
Author

Thanks @rwunderlich !This was the solution.

Wish you a nice weenend.

BR

Tino