Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sreeramhbk
Contributor III
Contributor III

Selected Quarter versus Previous Quarter Calculation

Hi Guys,

I have a requirement to create a KPI chart which shows the selected Quarter with previous Quarter. I have done successfully for MOM and YOY with the following formulaes':

MoM:

Sum({$<[Business Date.autoCalendar.Month]={$(=Month(((Max(Date([Order_Date],'MM/DD/YYYY'))))))}>}[Sales]) -

Sum({$<[Business Date.autoCalendar.Month]={$(=Month((AddMonths(Max(Date([Order_Date],'MM/DD/YYYY')),-1))))}>}[Sales])

YoY:

Sum({$<[Business Date.autoCalendar.Year]={$(=Year(((Max(Date([Order_Date],'MM/DD/YYYY'))))))}>}[Sales])-

Sum({$<[Business Date.autoCalendar.Year]={$(=Year((AddYears(Max(Date([Order_Date],'MM/DD/YYYY')),-1))))}>}[Sales])

But with the same approach I am not able to calculate the Selected Quarter vs Previous Quarter. Please assist. 

Many thanks.

Kind Regards,
Sreeram

Labels (1)
3 Replies
Sabiha
Contributor II
Contributor II

Hi

 

did you solve the problem?  Could you help?  

Sabiha
Contributor II
Contributor II

Hi

sorry I don't speak  English 

may be useful

year(FATURALAMA_TARIHI)&ceil(FATURALAMA_TARIHI/3) as Quarters

if(right( Quarters,1)='1', Sum({$<Quarters={$(=only(Quarters)-7)}>} NET_MIKTARS), Sum({$<Quarters={$(=only(Quarters)-1)}>} NET_MIKTARS))

Sabiha
Contributor II
Contributor II

sorry

 

year(FATURALAMA_TARIHI) & Ceil(Month(FATURALAMA_TARIHI)/3) as Quarters,