Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Manuel174102
Creator
Creator

Problem with tables

Hello everyone. 

I am having the following problem-

I have a table which looks like t ((The real table is huge, this is only to show what I want to do)

Number Type Code Version number Amount
1 4 1 10
1   2 10
1   3 10
2 5 1 5
2   2 5
3 4 1 15
3 4 2 15
3   3 15

 

And I need it to look like this:

what could I do?

 

Number Type Code Version number Amount
1 4 1 10
1 4 2 10
1 4 3 10
2 5 1 5
2 5 2 5
3 4 1 15
3 4 2 15
3 4 3 15
Labels (1)
1 Solution

Accepted Solutions
eddie_wagt
Partner - Creator III
Partner - Creator III

Hello @Manuel174102 ,

You don't need to write all the lines. You only have to add this line (substitute).

,	 If(Len([Type Code])>0,[Type Code],Peek([Type Code])) as [Type Code]

 

Regards Eddie

View solution in original post

4 Replies
eddie_wagt
Partner - Creator III
Partner - Creator III

Hello @Manuel174102 ,

You could use this in the load script

 

Table:
LOAD Number
,	 If(Len([Type Code])>0,[Type Code],Peek([Type Code])) as [Type Code]
,	 [Version number]
,	 Amount
;
LOAD * INLINE [Number	Type Code	Version number	Amount
1	4	1	10
1	 	2	10
1	 	3	10
2	5	1	5
2	 	2	5
3	4	1	15
3	4	2	15
3	 	3	15]
(delimiter is '	');

 

Kind regards

Eddie

If this answers your question or solves your issue, be sure to mark the answer as correct by clicking 'Accept as Solution'. This will mark the post as solved and other Qlikkies will gravitate towards this post as it as a possible solution for their issue. Multiple responses can be accepted as a solution so make sure to select all that apply.
Manuel174102
Creator
Creator
Author

Hello Eddie. 

Thank you. 

The problem is, my table that I pasted in an example table. The real table has over 40k lines, so I could not write all the lines.

 

eddie_wagt
Partner - Creator III
Partner - Creator III

Hello @Manuel174102 ,

You don't need to write all the lines. You only have to add this line (substitute).

,	 If(Len([Type Code])>0,[Type Code],Peek([Type Code])) as [Type Code]

 

Regards Eddie

Manuel174102
Creator
Creator
Author

thanks!!