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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

quarters mapping without dates

Hi,

new to qlikview and still trying to get a handle on it.  I have some data which do not have dates only years and quarters.  Trying to manipulate the data so I can show some historical charts.  However, how do I enable qlikview to recognize that with quarters after q4 it should count the next quarter as q1?  For instance if I want to show current quarter as 2015 Q3 and I want to reference 2014 Q4, I could say

current year & current quarter - 3

However, I'm getting 2015 Q0.

I've used the master calendar before, however I want to know if there is a short cut version for qlikview to recognize the above.

Thanks,

Carlo

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can create a table first in the script that creates Quarter values that also have a numeric value:

Quarters:

LOAD dual(Quarter, RowNo()) as Quarter [

Quarter

2012 Q1

....etc

2014 Q3

2014 Q4

2015 Q1

etc..

];

Or perhaps you can create the Quarters as date values:

LOAD

     Year,

     Quarter,

     MakeDate(Year, Quarter*3-2) as QuarterStart,

     ....other fields...

FROM ....


talk is cheap, supply exceeds demand
pratap6699
Creator
Creator

in script level: Load year, quarter,year & quarter as yearquarter from source

UI--> barchart-->dim-->yearquarter exp-->

sum({<yearquarter={">=$(=Min(yearquarter)<=$(=Min(yearquarter)-3))}>}amount)

MarcoWedel

Hi,

maybe also helpful:

QlikCommunity_Thread_182904_Pic2.JPG

QlikCommunity_Thread_182904_Pic1.JPG

LOAD *,

    Dual(Year&' '&Quarter, MakeDate(Year,Quarter*3-2)) as QuarterName;

LOAD Left(Quarter,4) as Year,

    Dual(Right(Quarter,2),Right(Quarter,1)) as Quarter

INLINE [

    Quarter

    2015 Q4

    2015 Q3

    2015 Q2

    2015 Q1

    2014 Q4

    2014 Q3

    2014 Q2

    2014 Q1

    2013 Q4

    2013 Q3

    2013 Q2

    2013 Q1

];

regards

Marco