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

previous quarter

how to find the previous quarter of the max year.i have to find the previous quarter of the max year having current quarter.

4 Replies
MK_QSL
MVP
MVP

=SUM({<Date= {'>=$(=QuarterStart(Max(Date),-1))<=$(=QuarterEnd(Max(Date),-1))'}>}Sales)

Not applicable
Author

Say you have fields Year,Quarter and MonthYear i.e. MonthName(Date) and your quarter field values are {Q1,Q2,Q3,Q4} and you have selected Q4

Then you can in your expression write something like this

sum({$<MonthYear={'>=$(=MonthYear(AddMonths(Max(Date)),-3))<=$(=MonthYear(Max(Date)))'}>})Sales)



Cheers,

Byron

Anonymous
Not applicable
Author

hi Byron,

The scenario is that I've to show Max quarter,previous quarter and previous year same quarter.

I have to show them in a chart and by default the max value should be shown on the chart.

Thanks in advance.

Anonymous
Not applicable
Author

hi Manish,

thanks for ur help but the value is showing zero in the chart.