Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QuarterYear selection for YoY

Hello all,

i have a table with YoY% (comparison between 2 years), I have a field called QtrYear which will have values like 2014/Q1, 2014/Q2, 2014/Q3 etc.

Now, if I select 2014/Q1 from QtrYear field, table should display YoY% for 2014Q1 vs 2013Q1.

Kindly let me know how this can be done.

Thanks for your help.

Regards,

Sheela

6 Replies
ecolomer
Master II
Master II

You need to created a field with Q1, Q2, Q3, Q4 values and select this filed to have you need

Not applicable
Author

hi Enrique,

Thanks for your quick response.

I do have separate Qtr field in the application, but I wanted to know if YoY% can be calculated even when selecting values from QtrYear field.

Thanks,

Sheela

PradeepReddy
Specialist II
Specialist II

try something like this...

Current Year-Qtr:   sum({<YearQtr={'$(=maxstring(YearQtr))'}>}Sales)

Previous Year-Qtr:  sum({<YearQtr={'$(=((left(MaxString(YearQtr),4)-1)&right(MaxString(YearQtr),2)))'}>}Sales)

Modify these expressions as per your requirement...

Not applicable
Author

hi Pradeep,

thanks for your reply, but this does not seem to work.

Thanks

Sheela

Not applicable
Author

Generally users will select Year and Qtr and look at YoY,
in case, they select QtrYear, then also YoY should be displayed.

this is my concern.

Thanks

Sheela

Not applicable
Author

Calculate start month and end month and use addmonths() function