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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
SAM81
Contributor II
Contributor II

Sum WHEN max date - help!!

Hi

I am trying to create an expression that generates a SUMPRODUCT value but only for the latest date in my data set.

Current expression is SUM(CLOSED*C_AGE)/SUM(CLOSED).  But this will calculate for all dates in my data set.  

I need this to only calculate for the latest week in my data set based on the week field name being 'WEEK_COMMENCING'

Can anyone help?

1 Reply
GaryGiles
Specialist
Specialist

Something like this:

=sum({<WEEK_COMMENCING={'$(=max(WEEK_COMMENCING))'}>} CLOSED*C_AGE) / sum({<WEEK_COMMENCING={'$(=max(WEEK_COMMENCING))'}>} CLOSED)