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: 
Anonymous
Not applicable

How to calculate ast 4 Week Average

I have the following expression in order to calculate  CA from the begining of the year till yeasterday

=num(Sum({1< DateTest={"$(='>=' & Yearstart(AddYears(Today(), -1)) & '<' &  AddYears(Today(), -1))"}>} [CA]  ),'# ##0 ;-# ##0 ')

How to calculate CA average for the last 4 weeks ?

3 Replies
sunny_talwar

Try to avoid re-posting the same question: Calculate an average for the last 4 weeks

Digvijay_Singh

try >= weekstart(today(),-4) in above expression and today() for current date.

jonathandienst
Partner - Champion III
Partner - Champion III

Something like

Sum({1< DateTest={">=$(=Date(Today() - 28)) <$(=Today())"}>} [CA])

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein