Skip to main content

Water Cooler

This space is for everyone to ask questions related to the Community Platform. It's a space for us to get to know each other and have some fun! Come in and gather around the Water Cooler!

Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 

Adjusting the fields to combine to one

Hi all, I'm trying to resolve the below first table and turn it to the second. 

I would like to turn the field to a field header and populate all rows below it.

I have a table output from Qlik like this:


Fruit 1 2 3 4 5
Apple null 10      
Pear null 5      
Apple     12    
Pear     1    
Apple       123  
Pear       12  
Apple         80




However my goal is to translate that to a table like this, where everything is combined kind of in a field, and an alternate row, where the field header is it's own field, and then the sales are combined to a column:

Fruit Month Sales
Apple 1 null
Pear 1 null
Apple 2 10
Pear 2 5
Apple 3 12
Pear 3 1
Apple 4 123
Pear 4 12
Apple 5 80
Pear 5 29

What's the best way to do this?

I hope this is an easily solution!

Labels (1)
1 Solution

Accepted Solutions
Specialist II
Specialist II

crosstable (Month, Sales) LOAD * from $(SourcePath)source.txt;

View solution in original post

3 Replies
Specialist II
Specialist II


Thanks @anat this looks similar to what I need, thankyou. If you had the syntax also that'd be handy!

Specialist II
Specialist II

crosstable (Month, Sales) LOAD * from $(SourcePath)source.txt;