Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Michiel_QV_Fan
Specialist
Specialist

Crosstable unexpected result

Hi,

I have a Excel source with 14 columns and 10 rows. Below a sample of the first 2 rows.

If I use crosstable and set the first 2 columns (year and KPI_Uren) as Attributes the output is:

Jaar KPI_Uren Data Data. So 2 columns named data. I cannot find a solution for this issue. The load is wrong.

Thanks for your reponse.

JaarKPI_Urenjanfebmrtaprmeijunjulaugsepoktnovdec
2008Totaal uren declarabel6865676969707173707071

65

1 Solution

Accepted Solutions
spsrk_84
Creator III
Creator III

Hi,

I think there might be some syntax problem...

as u said ur data is like this

Jaar KPI_UREN Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

2008Total UREN Declarabel 68 65 67 69 69 70 71 73 70 70 71 65

2009Total UREN Declarabel 68 65 67 69 69 70 71 73 70 70 71 65

For tthe above kind of table we need to use cross table function

CrossTable(Month , URENAMOUNT , 2)

Load

Jaar ,

KPI_UREN,

Jan ,

Feb,

Mar,

Apr,

May,

Jun ,

Jul,

Aug ,

Sep,

Oct,

Nov,

Dec

From XYZ.xls ;

The above Wriiten code is the script to convert the Xls to Croostable format .In that Croostable function

1st parameter is the name of the Months(i.e Jan ,feb........Dec are named as Month)

2nd Paremeter URENAMOUNT Column is the Namegiven to the Data in these month co,lumns and the third paremeter numeric indicates from which column cross tablehas to apply..

Try in this way i hopee it will be resolved...

Regards,

ajay

View solution in original post

2 Replies
spsrk_84
Creator III
Creator III

Hi,

I think there might be some syntax problem...

as u said ur data is like this

Jaar KPI_UREN Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

2008Total UREN Declarabel 68 65 67 69 69 70 71 73 70 70 71 65

2009Total UREN Declarabel 68 65 67 69 69 70 71 73 70 70 71 65

For tthe above kind of table we need to use cross table function

CrossTable(Month , URENAMOUNT , 2)

Load

Jaar ,

KPI_UREN,

Jan ,

Feb,

Mar,

Apr,

May,

Jun ,

Jul,

Aug ,

Sep,

Oct,

Nov,

Dec

From XYZ.xls ;

The above Wriiten code is the script to convert the Xls to Croostable format .In that Croostable function

1st parameter is the name of the Months(i.e Jan ,feb........Dec are named as Month)

2nd Paremeter URENAMOUNT Column is the Namegiven to the Data in these month co,lumns and the third paremeter numeric indicates from which column cross tablehas to apply..

Try in this way i hopee it will be resolved...

Regards,

ajay

Michiel_QV_Fan
Specialist
Specialist
Author

Superb!

Thank you!