Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
matthewp
Creator III
Creator III

AVG of the last 7 days not returning results

I have an expression to give me the AVG of TIMETAKEN in the last 7 days but it isn't returning any results.

 

=AVG({<STARTDATE={"<$(=date(today()-7))"} >}TIMETAKEN)

 

I can get yesterdays AVG with this and it works:

 

=AVG({<STARTDATE={"$(=Date(Today()-1))"}>} TIMETAKEN)

Labels (1)
1 Solution

Accepted Solutions
Venthan
Contributor III
Contributor III

Hi,

 

Please try with this,

=AVG(
{<STARTDATE={"$(=Date(Today()-7))","$(=Date(Today()-6))","$(=Date(Today()-5))"
,"$(=Date(Today()-4))","$(=Date(Today()-3))","$(=Date(Today()-2))","$(=Date(Today()-1))"}>
}TIMETAKEN)

View solution in original post

5 Replies
Channa
Specialist III
Specialist III

=AVG({$=$(=Date(Today(),-7))<$(=date(Today(),0))"}>} TIMETAKEN)

Channa
matthewp
Creator III
Creator III
Author

That gives an error 

Venthan
Contributor III
Contributor III

Hi,

 

Please try with this,

=AVG(
{<STARTDATE={"$(=Date(Today()-7))","$(=Date(Today()-6))","$(=Date(Today()-5))"
,"$(=Date(Today()-4))","$(=Date(Today()-3))","$(=Date(Today()-2))","$(=Date(Today()-1))"}>
}TIMETAKEN)

Channa
Specialist III
Specialist III

=AVG({$=$(=Date(Today(),-7))<$(=Date(Today(),0))"}>} TImeTakes)

Channa
Venthan
Contributor III
Contributor III

=AVG(
{<STARTDATE={">=$(=Date(Today()-7))<=$(=Date(Today()-1))"}>
}TIMETAKEN)

 

This should also provide the same result effectively.