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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to calculation the sum value when the period is not one number but a time range

I wanna calculate the sum value of the last year's period.

but my selection of the period is not only a number, but a length of time.

eg. my selection of period is from 201109 to 201202, :sum({$} value)

      so according to my definition of last year's period, the sum value should be sum the value from 201009 to 201102

but I don't know how should the expression be. sum( {$<period= {$(=(period)-100)}>} value) is only supposed to be available when period selection is one number.

4 Replies
perumal_41
Partner - Specialist II
Partner - Specialist II

Hi,

Try this expression

sum( {$<period= {'>=$(=Date(2010/09/01))<=$(=Date(2011/02/01))'}>}Value)

sujeetsingh
Master III
Master III

Why dont you post a sample?

Not applicable
Author

sum( {$<period= {'>=$(=Date(2010/09/01))<=$(=Date(2011/02/01))'}>}Value) is a great way

but my period will be changed with my period selection

I revised a little--> sum( {$<period= {'>=$(=min(period)-100)<=$(=max(period)-100)'}>}Value)

but it didn't show the right data.

ps. the format of period is not a Date.

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi,

Please post sample application for my reference

Regards

Perumal A