Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
rammiee93
Contributor II
Contributor II

Multile lines in line chart with columns a b c

 

I can able to create with the types not with the years. How to create  multiple lines with years as columnd

 

rammiee93_0-1683911385961.pngrammiee93_1-1683911392990.png

 

@Kushal_Chawda 

 

 

Labels (3)
1 Solution

Accepted Solutions
Kushal_Chawda

@rammiee93  I see. Then you may need to transform your data to row and column format using cross table

// Here * means all the fields displayed as Year. So try to include other columns at top and use * to represent all Year field which you want to trasnform

CrossTable(Year,Value)
Load Type,
     *
FROM Source;

if you have few more columns in data, you can update your code

CrossTable(Year,Value,3)
Load Type,
     Field1,
     Field2,
     *
FROM Source;

 

Now , create line chart with two dimensions

Add Year as "Group" Dimension and type as "Line" Dimension .

Then use your measure eg sum(value)

View solution in original post

6 Replies
Kushal_Chawda

@rammiee93  create line chart with two dimensions

Add Year as "Group" Dimension and type as "Line" Dimension .

Then use your measure eg sum(value)

rammiee93
Contributor II
Contributor II
Author

This is what I got so far. I couldn't able to figure out the part of the measure.  @Kushal_Chawda 

rammiee93_0-1683941153810.png

 

 

 

rammiee93
Contributor II
Contributor II
Author

@Kushal_Chawda  Any help on this?

 

Kushal_Chawda

@rammiee93  Why you have used valuelist? You can directly add Year field itself

rammiee93
Contributor II
Contributor II
Author

There is no field called Year, each year is a column

 

 

Kushal_Chawda

@rammiee93  I see. Then you may need to transform your data to row and column format using cross table

// Here * means all the fields displayed as Year. So try to include other columns at top and use * to represent all Year field which you want to trasnform

CrossTable(Year,Value)
Load Type,
     *
FROM Source;

if you have few more columns in data, you can update your code

CrossTable(Year,Value,3)
Load Type,
     Field1,
     Field2,
     *
FROM Source;

 

Now , create line chart with two dimensions

Add Year as "Group" Dimension and type as "Line" Dimension .

Then use your measure eg sum(value)