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

Announcements
Mastering Change Data Capture: Read Now
cancel
Showing results for 
Search instead for 
Did you mean: 
1Hunter
Contributor II
Contributor II

How to change table format

Hello everyone,

I was wondering if you could help me with the following situation.

Please consider the following table as input:

January Day1 Day2 Day3
1:00 a.m. AA BB CC
2:00 a.m. AA BB CC
3:00 a.m. AA BB CC
February AA BB CC
1:00 a.m. AA BB CC
2:00 a.m. AA BB CC
3:00 a.m. AA BB CC
March AA BB CC
1:00 a.m. AA BB CC
2:00 a.m. AA BB CC
3:00 a.m. AA BB CC


Desired Output:

Month Hour Day Value
January 1:00 a.m. 1 AA
January 2:00 a.m. 1 AA
January 3:00 a.m. 1 AA
January 1:00 a.m. 2 BB
January 2:00 a.m. 2 BB
January 3:00 a.m. 2 BB
January 1:00 a.m. 3 CC
January 2:00 a.m. 3 CC
January 3:00 a.m. 3 CC
February 1:00 a.m. 1 AA
February 2:00 a.m. 1 AA
February 3:00 a.m. 1 AA
February 1:00 a.m. 2 BB
February 2:00 a.m. 2 BB
February 3:00 a.m. 2 BB
February 1:00 a.m. 3 CC
February 2:00 a.m. 3 CC
February 3:00 a.m. 3 CC
March 1:00 a.m. 1 AA
March 2:00 a.m. 1 AA
March 3:00 a.m. 1 AA
March 1:00 a.m. 2 BB
March 2:00 a.m. 2 BB
March 3:00 a.m. 2 BB
March 1:00 a.m. 3 CC
March 2:00 a.m. 3 CC
March 3:00 a.m. 3 CC
3 Replies
Andrea_Bertazzo
Support
Support

Hi 1Hunter,

Thanks for the question. I would consider to use the crosstable function in the script. I hope this article can help you.

Other interesting articles are here in the help and in this community post.

I hope this helps.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up ! 🙂
1Hunter
Contributor II
Contributor II
Author

Hi @Andrea_Bertazzo,

Right, cross table seems to be the solution, but how can I specify that the data for January should load until it will find February.. that's my question.

Thank you!

Andrea_Bertazzo
Support
Support

Hi @1Hunter 

This is a good question. Could you check if generic load can help?

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up ! 🙂