Skip to main content
Announcements
Global Transformation Awards submissions are open! SUBMIT YOUR STORY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help needed on Top 5 products

Hi All,

Hope all are doing good !

I am new to Qlikview and i need help on top 5 products.Here is my scenario..

I have a line chart with Month and Products Dimensions and expression to calculate previous 6 months rolling total.

Now i need to display top 5 products sales for past 6 months. i need month on x-axis.

i tried dimension limits for products dimension but no luck. below is the expression i am using.

Sum({<Year=, Quarter=, Month=,  Date={">=$(=MonthStart(Max( Date),-5))<=$(=Max( Date)))"}>}Sales

i tried calculated dimension as well with below expression

aggr(If(Rank(Sum({<Year=, Quarter=, Month=,  Date={">=$(=MonthStart(Max( Date),-5))<=$(=Max( Date)))"}>}Sales))<=5,Products),Products)

Please help in this regard.

Thanks in advance

Regards,

Chandrika

6 Replies
Kushal_Chawda

try below calculated dimension

aggr(If(Rank(Sum({<Year=, Quarter=, Month=,  Date={">=$(=MonthStart(Max( Date),-5))<=$(=Max( Date)))"}>}Sales))<=5,Products),Month,Products)

engishfaque
Specialist III
Specialist III

Dear Chandrika,

Please check listed below link, I hope listed below post will help you.

top 10 customers by their Invoice Amount

Kind regards,

Ishfaque Ahmed

Not applicable
Author

Hi ahamad,

Thanks for the response.

In my scenario. i have two dimensions Month and products.

i have tried dimension limits option but no luck.

Thanks,

Chandrika

Not applicable
Author

Hi Kush,

I have tried the expression that you have provided.But it is returning the products for current month.But i want to show previous 6 months.

Thnanks,

Chandrika

Kushal_Chawda

Can you share the sample?