Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
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

1 Solution

Accepted Solutions
Kushal_Chawda

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

Similar to monthstart we have Weekstart, try with that

WeekStart(date [, period_no])

Kushal_Chawda

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