Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jblomqvist
Specialist
Specialist

Load script to load this type of (unfriendly format) table?

Hi all,

How would you create a script that loads this type of table?

      

Year201120122013
CustomerSalesCustomerSalesCustomerSales
Nike55,000SuperDry12,000Numa90,000
Adidas600,000Box43,000Reebok85,000
Puma64,000Train65,000Kel81,000

It is not in a great format a computer can read easily so checking with you

2 Replies
awhitfield
Partner - Champion
Partner - Champion

Hi John,

check out the following post:

https://community.qlik.com/thread/32556

Andy

ahaahaaha
Partner - Master
Partner - Master

Hi John,

I want your example to describe the approach as such data can be loaded. This is just a variant of how you can use the transformation step when loading such files.

Initial data

1.jpg

Open file wizard

2.jpg

Set the "Embedded Lebels"

3.jpg

Next, go to the transformation step

4.jpg

5.jpg

Next, the sequence of movements can be different. Consider one of them.

Go to the tab "Unwrap" and select cursor boundary between 2 and 3 fields

6.jpg

click select the border (it turns blue) and press the button "Unwrap"

7.jpg

9.jpg

The same action is repeated for the rightmost two fields. We obtain the following

10.jpg

Next, add a new column "Year". To do this, go to the tab "Column" and push button "New..."

11.jpg

In the dialogue window that opens, set the flag "Replace Null Value with Previous Value" and push button "Cells from these rows..."

12.jpg

In the dialogue window that opens, set the "starts with" and "20", then sequentially presses the button "Add" and "Ok" and next dialogue window "Ok"  also.

13.jpg

We obtain the following

14.jpg

Next, go to the tab "Garbage", cursor select line to be removed and presses the button "Delete Marked".

15.jpg

Result

16.jpg

After presses the button "Next" rename the field "Year" in the next dialog box, remove the unnecessary field and press the button "Finish" (For our example, we did all the action).


The script editor received the following code snippet

18.jpg

After loading the following internal table is obtained

19.jpg

In this example, I just wanted to show how you can work with the step transformation QlikView.

I will be glad if you could help.

Regards,

Andrey