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: 
ebrambilla
Contributor III
Contributor III

Yet another Cross-Selling problem

I have a Cross-Sell chart, analyzing the changes respect the previous Year of sales at product group level.

The chart show for each customer:

in the column CROSS_IN the value "IN" when the condition [Sales Previous year=0, Sales Current Year>0] is met.

in the column CROSS_OUT the value "OUT" when the condition [Sales Previous year>0, Sales Current Year=0] is met.

Please see an example in the following table.

CUST GROUP PREV_YEAR CUR_YEAR CROSS_IN CROSS_OUT
Customer-01KIWI01520IN
Customer-01MANGO0740IN
Customer-01ANANAS2500OUT
Customer-01APPLE18900OUT
Customer-02KIWI0190IN
Customer-02MANGO0920IN
Customer-02APPLE6400OUT
Customer-02ANANAS9802030
Customer-03KIWI0880IN
Customer-03MANGO280490
Customer-03APPLE7500OUT
Customer-03ANANAS840920
Customer-04MANGO570570
Customer-04ANANAS700750
Customer-04KIWI7401480
Customer-04APPLE8500OUT


Now, I would to apply a filter showing in the chart ONLY rows representing IN or OUT conditions. In other words, I would to suppress rows where [Sales Previous Year>0 AND Sales Current Year>0]


So, the Table resulting from filter should be:

CUST GROUP PREV_YEAR CUR_YEAR CROSS_IN CROSS_OUT
Customer-01KIWI01520IN
Customer-01MANGO0740IN
Customer-01ANANAS2500OUT
Customer-01APPLE18900OUT
Customer-02KIWI0190IN
Customer-02MANGO0920IN
Customer-02APPLE6400OUT
Customer-03KIWI0880IN
Customer-03APPLE7500OUT
Customer-04APPLE8500OUT


Any idea on how to apply this filter?

I attach a qvw document containing an example.

Thanks for help!

Emilio

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

3 Replies
morganaaron
Specialist
Specialist

It may be best to create these fields as flags in your script - use the same conditions and create a resident load to your table that aggregates the sales by the customer, group and year,.

You could nest it to create one flag based on 2014 and 2015 data or create two separate flags for each year. That way you can either use a listbox to literally filter the data, or you can use it within your set analysis.

anbu1984
Master III
Master III

Check this

ebrambilla
Contributor III
Contributor III
Author

Thank you Mr. Cheliyan, wonderful!