Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

matthewp
Contributor III

Year on year line chart

how can i create a year on year line chart?

what is meant to be simple is always a mess about in qlikview!!

Data

Agroup

group1

group2

group3

etc

Yearperiod

201510

201511

201512

201601

201602

201603

etc

and quantity

what i want is months along the bottom, quantity up the side and then a line for each year (goes back to 2006 so will need to be dynamic)

like this

Tags (1)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Year on year line chart

Yes, tableau is more convenient with date fields in this regard. In Qlikview you should create month and year fields from your date first. Those fields you can then use as dimensions in your chart.

MyData:

LOAD

     Agroup,

     Year(Date) as Year,

     Month(Date) as Month

FROM

     ...etc

     ;

That's the best way. Alternatively you can create calculated dimensions in the UI using the same expression Year(Date) and Month(Date)


talk is cheap, supply exceeds demand
3 Replies
MVP & Luminary
MVP & Luminary

Re: Year on year line chart

Yes, tableau is more convenient with date fields in this regard. In Qlikview you should create month and year fields from your date first. Those fields you can then use as dimensions in your chart.

MyData:

LOAD

     Agroup,

     Year(Date) as Year,

     Month(Date) as Month

FROM

     ...etc

     ;

That's the best way. Alternatively you can create calculated dimensions in the UI using the same expression Year(Date) and Month(Date)


talk is cheap, supply exceeds demand
matthewp
Contributor III

Re: Year on year line chart

ok i have them as fields,

now what do i do?

i have year, month, Agroup as dimensions

and SUM(quantity) as expression

order of dimensions are

month

Agroup

year

month is along the bottom of the graph, but its still just 1 line per Agroup

MVP & Luminary
MVP & Luminary

Re: Year on year line chart

A line chart can have two dimensions and one expression or one dimension and lots of expressions. If you want to use three dimensions than you can use a line chart. I think you will have to choose between Year and Agroup as second dimension.


talk is cheap, supply exceeds demand