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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
baarathi
Creator III
Creator III

Previous Year's Quarter

I have tried the below expression to calculate Previous Year's quarter of current selected quarter. I have select the current quarter Oct-Dec 2017 in filter. I could not get the previous year's quarter Oct-Dec 2016?

= If(IsNull(GetCurrentSelections()) or (QuarterEnd(Max(TransactionDate)) = QuarterEnd(Today()))

, Sum({<TransactionDate  = {">=$(=(Date(QuarterStart(Max(TransactionDate ),-5),'YYYY-MM-DD'))) <=$(=(Date(QuarterEnd(Max(TransactionDate ),-5),'YYYY-MM-DD')))"} >}BilledAmount)

, Sum({<TransactionDate  = {">=$(=(Date(QuarterStart(Max(TransactionDate ),-4),'YYYY-MM-DD'))) <=$(=(Date(QuarterEnd(Max(TransactionDate ),-4),'YYYY-MM-DD')))"}>} BilledAmount))

2 Replies
baarathi
Creator III
Creator III
Author

Hey stalwar1

          ‌‌ can you help me out with this?

Thanks and Regards

Baarathi

agigliotti
MVP
MVP

maybe this:

Sum( {< TransactionDate = {">=$(=QuarterStart(Max(TransactionDate),-4))<=$(=QuarterEnd(Max(TransactionDate),-4))"} >} BilledAmount )

I hope it helps.

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it