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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Pomna
Creator III
Creator III

Dynamic quarters on chart title.

Hello everyone, I need help creating dynamic quarters on a chart title. I want the chart to show 2018 Q4 and 2019 Q1.Am at a loss on how to get last quarter and quarter before last. That is, 2018 Q4 and 2019 Q1. Below is the code I have. I would appreciate your help. Thanks

 

date(QuarterName(Today(), -1),'Q')

2 Solutions

Accepted Solutions
JordyWegman
Partner - Master
Partner - Master

Hi Ngumdo,

Use this, first one is two quarters ago, second one is last quarter.

=Year(AddMonths(Today(),-6)) & 'Q' & Ceil(Num(Month(AddMonths(Today(),-6)))/3) 
& ' Next Quarter ' & 
Year(AddMonths(Today(),-3)) & 'Q' & Ceil(Num(Month(AddMonths(Today(),-3)))/3)

Jordy

Climber 

Work smarter, not harder

View solution in original post

Pomna
Creator III
Creator III
Author

Thank you so much JordyWegman. 

 

View solution in original post

4 Replies
JordyWegman
Partner - Master
Partner - Master

Hi Ngumdo,

Use this, first one is two quarters ago, second one is last quarter.

=Year(AddMonths(Today(),-6)) & 'Q' & Ceil(Num(Month(AddMonths(Today(),-6)))/3) 
& ' Next Quarter ' & 
Year(AddMonths(Today(),-3)) & 'Q' & Ceil(Num(Month(AddMonths(Today(),-3)))/3)

Jordy

Climber 

Work smarter, not harder
Pomna
Creator III
Creator III
Author

Thank you so much JordyWegman. 

 

JordyWegman
Partner - Master
Partner - Master

Good! But think about it, because you are talking about the last and the one before that. It's July the 2nd today and that means Q3 has started. So according to your description, mine was good and you need Q1 en Q2 of 2019.

If that isn't right, then yours is just fine!

Jordy

Climber

Work smarter, not harder
Pomna
Creator III
Creator III
Author

You are right. Thank you