Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

To get Top 5 last week

Hello Friends,

I am trying to get the list of items which has maximum sale during the last week. I am using rank with set analysis to achieve this, however it only works when period is excluded.

Another requirement is to get the top most item sold for each week on rolling 12 basis. Can someone please help me with this.

Attached is the document with sample data.

Regards,

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

In the chart dimension put the Prticular dimension,

in the expression formula is:

=if(rank(sum({<[Sale Date]={"$(= '>=' & date(VStartDate) & '<=' & date(VEndDate))"}>} [Prices Sold]),Perticular)<=5,

  sum({<[Sale Date]={"$(= '>=' & date(VStartDate) & '<=' & date(VEndDate))"}>} [Prices Sold])

)

View solution in original post

3 Replies
sundarakumar
Specialist II
Specialist II

To avoid selection of period excluding ur set analysis value u will have to add it to set analysis like

sum({<saledate={">=vDateFrom<=vDateTo",Period=}>}sales) This will make qlikview to ignore any selection in period.

To get rolling 12 months values create similar variables which denotes the start and end date of ur 12 month period.

-Sundar

Anonymous
Not applicable
Author

In the chart dimension put the Prticular dimension,

in the expression formula is:

=if(rank(sum({<[Sale Date]={"$(= '>=' & date(VStartDate) & '<=' & date(VEndDate))"}>} [Prices Sold]),Perticular)<=5,

  sum({<[Sale Date]={"$(= '>=' & date(VStartDate) & '<=' & date(VEndDate))"}>} [Prices Sold])

)

Not applicable
Author

Thanks for your help. This works perfectly for one weeks table however need to work out to for my second requirement to get the top item for each week for last 12 weeks.