Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Table pivot in Loading script

Hello All,

I am new on Qlikview so accept my apologizes if my question is too easy.

in a loading script I am loading a table like the one below:

ProjectEst Cost 2017Est Cost 2018Est Cost 2019Est Cost 2020
Proj 1100508080
Proj 21201007050
Proj 3......
Proj 4

I would like to create in the script a table from the one above to look like the one below:

ProjectEst costYear
Proj11002017
Proj 1502018
Proj 1802019
Proj 1802020
Proj 21202017
Proj 21002018
Proj 2702019
Proj 2502020
...

Would you know how to do that?

Regards,

Pierre.

1 Solution

Accepted Solutions
sergio0592
Specialist III
Specialist III

Hi Pierre,

Take a look here. Cross table instruction will help you

The Crosstable Load

View solution in original post

5 Replies
sergio0592
Specialist III
Specialist III

Hi Pierre,

Take a look here. Cross table instruction will help you

The Crosstable Load

el_aprendiz111
Specialist
Specialist

Hi Pierre

tmp:
CrossTable(Year, [Est Cost])
LOAD * Inline
[
Project,Est Cost 2017,Est Cost 2018,Est Cost 2019,Est Cost 2020
Proj 1,100,50,80,80
Proj 2,120,100,70,50
Proj 3,90,90,,
Proj 4,,,10,1
]
;

NoConcatenate

SUMARY:
LOAD
Project,
[Est Cost],
Right(Year,4) as Year Resident tmp
Where [Est Cost]>0
;

DROP Table tmp;

Projet.png

ankitasinghal
Contributor II
Contributor II

Hi ,

You could also use Pivot chart directly and get this result.

Kindly find attached QV document in which i did same.

Thanks ,

Ankita

Anonymous
Not applicable
Author

Thank you very much, it works great.

Regards,

Pierre.

Anonymous
Not applicable
Author

Thank you very much for your help, this is ,perfect.

Regards,

Pierre.