Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Week Rank

Trying to show the Rank of current week based on Sum of Sales and Region. Attached is a sample.

I need to show only current week data but also it's Rank with respect to previous weeks of the year.

Thank you.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try: only({<Week={$(vCurrWeek)},Year={$(vCurrYear)}>}aggr(NODISTINCT rank(total sum({<Year={$(vCurrYear)}>}Sales)),Week))


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Try: only({<Week={$(vCurrWeek)},Year={$(vCurrYear)}>}aggr(NODISTINCT rank(total sum({<Year={$(vCurrYear)}>}Sales)),Week))


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Thank you Gysbert!

I just had to add Region and take out Total:

only({<Week={$(vCurrWeek)},Year={$(vCurrYear)}>}aggr(NODISTINCT rank(sum({<Year={$(vCurrYear)}>}Sales)), Region, Week))