Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

calculations using variables

hi experts,

i have the list box for calendaryearquarter.

also i have calendar years 2014, 2015

i have set variables for current quarter & previous quarters as below

vPreviousQtr= if(GetSelectedCount(CalendarYearQuarter)<>1,'' &if(RIGHT(CalendarYearQuarter,1)=1,LEFT(CalendarYearQuarter,4)-1 & ' Q4' ,

LEFT(CalendarYearQuarter,6)&(RIGHT(CalendarYearQuarter,1)-1)))

vMaxQuarter=YEAR(MAX(DATE)) & ' Q' & MAX(CEIL(Month/3))

there are some sales amount for every quarter which is in a chart

when i select on a particular quarter, it should display the current quarter name in one chart & previous quarter name in another chart.

i.e., for ex if i select Q2, one chart will have Q2 & other will have Q!.

for all the quarters except Q1, its working fine. if i click on Q1 2015, it should display 2014 Q4 as well. but it is not.

Please give some suggestions to make it out

1 Reply
Highlighted
mjayachandran
Contributor II

Re: calculations using variables