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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Previous 20 weeks

Hi all,

Need a line chart giving me the results of last 20 weeks. Now I already achieved this with my months for a 3,6,12 month chart but can't seem to figure out how it works for the weeks.

This expression gives me the last 4 months and works when I got 2016 = Feb 16, Jan 16, Dec 15, Nov 15

=sum({<Week=, MonthName=, Year=, DivisionName = {***'} + {'****'}, PerformanceDate  ={">=$(=MonthStart(AddMonths(Today(),-4)))<$(=MonthEnd(Today()))"}>} Production.DurationHrs)

/

Count({<Week=, MonthName=, Year=, DivisionName = {****'} + {****'}, PerformanceDate  ={">=$(=MonthStart(AddMonths(Today(),-4)))<$(=MonthEnd(Today()))"}>} Production.Name)*5

Kind regards

Vincent

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda
MVP
MVP

try thid

=sum({<Week=, MonthName=, Year=, DivisionName = {***'} + {'****'}, PerformanceDate  ={">=$(=date(Today()-140))<=$(=date(Today()))"}>} Production.DurationHrs)

/

Count({<Week=, MonthName=, Year=, DivisionName = {****'} + {****'}, PerformanceDate  ={">=$(=date(Today()-140))<=$(=date(Today()))"}>} Production.Name)*5

View solution in original post

2 Replies
Digvijay_Singh
MVP
MVP

Similar to monthstart we have Weekstart, try with that

WeekStart(date [, period_no])

Kushal_Chawda
MVP
MVP

try thid

=sum({<Week=, MonthName=, Year=, DivisionName = {***'} + {'****'}, PerformanceDate  ={">=$(=date(Today()-140))<=$(=date(Today()))"}>} Production.DurationHrs)

/

Count({<Week=, MonthName=, Year=, DivisionName = {****'} + {****'}, PerformanceDate  ={">=$(=date(Today()-140))<=$(=date(Today()))"}>} Production.Name)*5