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

Making chart from yearly data

I'm having a problem with a data set that I need to combine in different ways in QV.

The problem is the data sources, I do not understand how I can make charts/pivots of this information.

The data is year-based and looks like this:

Country2001
2002
2003
2004
USA30555343
Canada206723512
England10454524
France50584534
Germany40763574

How do I turn this "back" into something like this (or do I even need to?):

Country
YearAmount
USA200130
USA200255
USA200353
USA200443
Canada200120
Canada200267
Canada2003235
Canada200412
1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

Hi,

See the attached sample file try to load data some thing like this.

By below code

Data:

CrossTable(Year, Amount)

LOAD Country,

     [2001],

     [2002],

     [2003],

     [2004]

FROM

Data.xlsx

(ooxml, embedded labels, table is Sheet1);

Let me know about this

HTH

Rgds

Anand

View solution in original post

3 Replies
Not applicable
Author

Hi Gabriel,

try using CrossTable...I tried with this snippet....

YrsData:
Load * Inline [
country, 2001, 2002, 2003
A, 1, 2, 3
B, 2,3,4
C,3,4,5
];

CrossTable(Years, Sales) Load * Resident YrsData;

its_anandrjs
Champion III
Champion III

Hi,

See the attached sample file try to load data some thing like this.

By below code

Data:

CrossTable(Year, Amount)

LOAD Country,

     [2001],

     [2002],

     [2003],

     [2004]

FROM

Data.xlsx

(ooxml, embedded labels, table is Sheet1);

Let me know about this

HTH

Rgds

Anand

Not applicable
Author

Thanks a million for pointing me in the right direction, I still dont understand how it works but seems QV has a CroosTable -wizzard built in that does the magic for you