Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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 ....
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)
Hi,
maybe also helpful:
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