Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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