Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
chmahi7033
Contributor
Contributor

Current Quarter and Previous quarter Creation

I created current quarter variable based on today() date but I don't wont this logic.

Any one could help me how create current quarter based on quarter field(Q1-19,Q2-19,Q3-19,Q4-19).

2 Replies
Brett_Bleess
Former Employee
Former Employee

Best I have is the following Design Blog link on Set Analysis, you may actually want the 'Dates' related post that is a link at the bottom of the following one:

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

Here is the base URL to the Design Blog area in case you want to do some further searching on your own:

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

You may need to look at the Master Calendar post potentially or Canonical Calendar post too...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Chanty4u
MVP
MVP

try this

 

vCurrent_Quarter=   Quarter={"$(=GetFieldSelections(Quarter))"}

vPrevious_Quarter = Quarter={"$(=GetFieldSelections(Quarter)-1)"}

 

sum({<$(=vCurrent_Quarterr)>}Sales)

sum({<$(=vvPrevious_Quarter)>}Sales)