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: 
rajaqliks
Contributor III
Contributor III

Show Last 12 Weeks count

Hi Qlik Experts,

I have to show last 12 weeks count, i am addding the sample application. and i am adding a picture what i need to show.

Capture.PNG

1 Solution

Accepted Solutions
sunny_talwar

Try this expression

=Count(DISTINCT {<Weekend = {"$(='>=' & Date(Max(Weekend) - 77, 'MM/DD/YYYY') & '<=' & Date(Max(Weekend), 'DD/MM/YYYY'))"}>} Key)

image.png

View solution in original post

5 Replies
sunny_talwar

Try this expression

=Count(DISTINCT {<Weekend = {"$(='>=' & Date(Max(Weekend) - 77, 'MM/DD/YYYY') & '<=' & Date(Max(Weekend), 'DD/MM/YYYY'))"}>} Key)

image.png

rajaqliks
Contributor III
Contributor III
Author

Thank you so much sunny, and can you please explain why you are using 77.

sunny_talwar

77 is going back 11 weeks... so, because we are including the current week and considering it as 0, we are going back 11 weeks to make a total of 12 weeks.

rajaqliks
Contributor III
Contributor III
Author

Ok sunny now its clear, thank you very much sunny really helpful your support
rajaqliks
Contributor III
Contributor III
Author

In a year we have only 54 weeks right, then wt is 77