Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 |
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
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. |
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.
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
thanks!!