Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
stevejones1
Contributor III
Contributor III

Complete Week

Hi

I have the data as below format , date associated with a week , i need to show data for rolling past 4 weeks , so if i consider today() - 30 then i am showing data for only a part of the week ... how do i make sure that i get data for complete week ?

example in the below data i am seeing only 1 day in W3 instead i want all days in w3 week

here is my current expression:

=count({OpenDate= {">=$(=Date(today()-30))"},Type ={'TS'}>} DISTINCT(CaseNumber))

03/18/2018W7
03/17/2018W7
03/16/2018W7
03/15/2018W7
03/14/2018W7
03/13/2018W7
03/12/2018W7
03/11/2018W6
03/10/2018W6
03/09/2018W6
03/08/2018W6
03/07/2018W6
03/06/2018W6
03/05/2018W6
03/04/2018W5
03/03/2018W5
03/02/2018W5
03/01/2018W5
02/28/2018W5
02/27/2018W5
02/26/2018W5
02/25/2018W4
02/24/2018W4
02/23/2018W4
02/22/2018W4
02/21/2018W4
02/20/2018W4
02/19/2018W4
02/18/2018W3
4 Replies
Digvijay_Singh

May be Weekstart can help -

=count({OpenDate= {">=$(=Weekstart(Date(today()-30)))"},Type ={'TS'}>} DISTINCT(CaseNumber))

Siva_Sankar
Master II
Master II

Hi Steve,

You may use something like below using weekstart function or the attached approach.

Sum({<Year=, Quarter=, Month=, Week=, Date={‘>=$(=WeekStart(Max(Date), -14))<=$(=Date(Max(Date)))’}>} Sales )


Find the attached qvw.


-Siva

stevejones1
Contributor III
Contributor III
Author

Please take a look at my file , i am using 1 in my expression(To avoid other selections) .. i want to show past 5 weeks only , and other selections made should NOT effect this chart.

But here when i select other filter values the charts keep changing .. please help!

stevejones1
Contributor III
Contributor III
Author

Any help on this?