Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Aggregate value for 7 days after date selected

Hi guys,

I have information about about nº of downloads by date. On my Dashboard i have a table with DATE and Nº OF DOWNLOADS, and i have a filter DATE too.

My question is. It is possible create a expression too wen i select some date, my output be the aggregation from Nº OF DOWNLOADS 7 days  starting DATE selected.

Exemple:

I select date '2016-06-05' and the output is


sum( {<DATE={'2016-06-05'+'2016-06-06'+.........+'2016-06-07'}>} Nº OF DOWNLOADS)

Thanks in advance,

Pedro Lopes

6 Replies
settu_periasamy
Master III
Master III

May be try

=sum( {<DATE={'>=$(=DATE)<=$(=Date(DATE+7))'}>} [Nº OF DOWNLOADS])

sunny_talwar

Not sure how the environmental variables are set, I would just suggest one change:

=Sum({<DATE={'>=$(=Date(Max(DATE), 'YYYY-MM-DD'))<=$(=Date(Max(DATE)+7, 'YYYY-MM-DD'))'}>} [Nº OF DOWNLOADS])

Anonymous
Not applicable
Author

This expression only give me the value from selected day.

sunny_talwar

Are you making selection in DATE field? or is there another field you are making selection in?

Anonymous
Not applicable
Author

Yes, i only have a data field to make selection. 

Example:

A DATA filter and a table with DATA, NAME of PRODUCT and N OF DOWNLOADS.

Anonymous
Not applicable
Author

Sorry DATA means DATE