Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Ordering fields before crosstable load

Hi,

I have a table with eleven fields, five of them are text and date fields and the oder six are figures.

I would like to crosstable the table by using :

CROSSTABLE (newfieldname,fieldvalue,5) LOAD

but it does not work properly because the fields in the original table are not oredered being the first five ones the non-figures ones.

Is it necessary to order before crosstable? if so, how to order fields?

Does it exist a sintaxis to explicit the non-figures fields into the crosstable load function?

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Just explicitely state the correct order in the field list of your load statement:

CROSSTABLE (newfieldname,fieldvalue,5) LOAD

     TextOrDateField1,

     TextOrDateField2,

     TextOrDateField3,

     TextOrDateField4,

     TextOrDateField5,

     FigureField1,

     FigureField2,

     FigureField3,

     FigureField4,

     FigureField5,

     FigureField6

FROM ...;

You need to use the real field names, of course.

View solution in original post

2 Replies
swuehl
MVP
MVP

Just explicitely state the correct order in the field list of your load statement:

CROSSTABLE (newfieldname,fieldvalue,5) LOAD

     TextOrDateField1,

     TextOrDateField2,

     TextOrDateField3,

     TextOrDateField4,

     TextOrDateField5,

     FigureField1,

     FigureField2,

     FigureField3,

     FigureField4,

     FigureField5,

     FigureField6

FROM ...;

You need to use the real field names, of course.

CKirsten
Contributor
Contributor

What if you need to import the fields dynamically except for the first field that states the test or date field?