Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

I need help in finding the products who were top ten in the last year but not in the top 10 of current year

I have attached a qvw please let me know if you require any further explainations

10 Replies
Not applicable
Author

Hi,

The attachment is not opening. Can you attach it again?

Not applicable
Author

Hi Irfan,

   You may  implemented the section access in this app. It's not opening the file.

   Any way will try to explain here for the solution. Take a straight table as a chart and give the expression for last year and then Go to Dimension Limits tab choose the option "Restrict which values are displayed using the first expression" below mention 10 and then in the same tab remove the option "Others". After that go to Sort Tab choose the Expression Option and then make it as Descending. Hope understand.

Regards,

Santhosh G

Anonymous
Not applicable
Author

Please check now

Anonymous
Not applicable
Author

can you try my download my app now

Anonymous
Not applicable
Author

i have to build an expression which returns those products which were part of top 10 products last year but not this year sort of speaking recall the method in sets called intersection if a=last year and b=current year then i have to build B - A

Not applicable
Author

Hi Mohammad, see if my solution  works for you

jagan
Luminary Alumni
Luminary Alumni

Hi Irfan,

Try like this

Create two variables

=Chr(39) & Concat(if(aggr(rank(SUM({<Year={$(=Max(Year))}>} Sales),4,0),Product_Name)<=10,Product_Name), Chr(39) & ',' & Chr(39), 10) & Chr(39)

=Chr(39) & Concat(if(aggr(rank(SUM({<Year={$(=Max(Year)-1)}>} Sales),4,0),Product_Name)<=10,Product_Name), Chr(39) & ',' & Chr(39), 10) & Chr(39)

Now create a chart with Product_Name as dimension and use this as expression

=Sum({<Year={"$(=MAX(Year))"}, Product_Name={$(vPreviousYearTop10)}  - {$(vCurrentYearTop10)} >} Sales)/1000

Hope this helps you.

Regards,

Jagan.

Anonymous
Not applicable
Author

your solution only works for the max year. if i select 2007 it doesn't work.

MK_QSL
MVP
MVP

May be because there are no product in TOP 10 in Year 2007 which are in top 10 in year 2006.