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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

get values for the last year

I have a variables in format YYYYMMDD

I have the following expression

sum({$<Date ={">=$(vFromDate) <=$(=if((right($(vToDate),2) ='31' and right(left($(vToDate),6),2) ='12' ),left(AddYears(vToDate,1),4)&'01'&'01',if(right($(vToDate),2) ='31', left(vToDate,4)&right(left(AddMonths(vToDate,1),7),2)&'01', left($(vToDate),6)&(right($(vToDate),2) ))))"}>}[Prix de vente TTC])

How can I get values for the same period but for the last year for the same expression ?

3 Replies
sunny_talwar

Are you using this in a chart with Date as a dimension or is this a text box expression?

Anonymous
Not applicable
Author

in a chart

sunny_talwar

If date is your dimension then you will need to use the above() or below() function based on your sorting to get this to work. To find the exact expression, it would be more useful if you can provide a sample to work with.

Best,

Sunny