Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
ebrambilla
New 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
Honored Contributor III

Re: Yet another Cross-Selling problem

3 Replies
morganaaron
Valued Contributor

Re: Yet another Cross-Selling problem

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
Honored Contributor III

Re: Yet another Cross-Selling problem

Highlighted
ebrambilla
New Contributor III

Re: Yet another Cross-Selling problem

Thank you Mr. Cheliyan, wonderful!