Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
shruthibk
Creator
Creator

Cross table Conversion with incremental columns

Hi all,

I got requirement to transpose an  excel file  but my concern is going forward columns will be incremented how can i automate it.

for example

idNameStatus Assessment RatingAssessment Rating Quarter2015Q42016Q12016Q22016Q3

i have transposed using cross table like this

CrossTable(YearQuarter, Rating, 5)

LOAD [ Id],

     [ Name],

     [ Status],

     Assessment Rating],

     [Assessment Rating Quarter],

2015Q4,

2016Q1,

2016Q2,

2016Q3

from

going forward i ll be getting data like

idNameStatus Assessment RatingAssessment Rating Quarter2015Q42016Q12016Q22016Q32016Q42017Q1

how can i automate this to get new columns to transpose otherewise i have to manually add everytime

Thanks ,

Shruthi

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

In this case it's easier to use the * (star) instead of an explicit field list. That way extra Quarter columns don't require a change in the script.

CrossTable(YearQuarter, Rating, 5)

LOAD * FROM ..

Note: You do have to make sure the first five fields are also always the first five columns in the excel file.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

In this case it's easier to use the * (star) instead of an explicit field list. That way extra Quarter columns don't require a change in the script.

CrossTable(YearQuarter, Rating, 5)

LOAD * FROM ..

Note: You do have to make sure the first five fields are also always the first five columns in the excel file.


talk is cheap, supply exceeds demand
shruthibk
Creator
Creator
Author

Thank You