Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
bert_geraerts
Contributor II
Contributor II

show value for different dimention in graph

Can someone help me with the following issue that I'm having:

We have a list of products, that contain the following data:
%OrigItem, %Item2, Description

1304745, 1304745, TEST PROD A
1304745, 1304913, TEST PROD B

%OrigItem is the original productnumber.
%Item2 is the replacement productnumber for %OrigItem.

In a different table we have the stock (=Stock) + average sales (=AvgSales) for each %Item2 and I would like to show the following in a tablechart:

1304745, 1304745, TEST PROD A, sum(Stock) product 1304745, sum(AvgSales) product 1304745
1304745, 1304913, TEST PROD B, sum(Stock) product 1304913, sum(AvgSales) product 1304745

So for the replacement product B, I still want to show the total sales for product A.

How can this be done using set analyses?  

 

 

11 Replies
Zhandos_Shotan
Partner - Creator II
Partner - Creator II

Finally i get what you want!

Here is decision:

if(%Item2<>%OrigItem,
sum({<%Item2=P({1}%OrigItem)>} total<%OrigItem> AvgSales),
sum(AvgSales)
)

and qvw file.

bert_geraerts
Contributor II
Contributor II
Author

Perfect, thx !