Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have my data as below, need to fill the gaps using the previous value. Used the following formula
if(Len(Step)>0,Step,Peek(Step)) as Step2 but it is only filling the next row not all the rows. Request your help to achieve this.
Need to achieve this using script.
Please refer the attachment for data.
Thank You in Advance...
OutSold | B224395 |
PRC | B224395 |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
Transfer | B224395 |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
B224395 | |
CPC | B224395 |
B224395 | |
B224395 | |
B224395 |
Try this:
If(Len(Step)>0,Step,Peek('Step2')) as Step2
Script for your sample:
Table:
LOAD Step,
StepCode,
Date,
StepCount,
If(Len(Step)>0,Step,Peek('Step2')) as Step2
FROM
[Example (3).xlsx]
(ooxml, embedded labels, table is Sheet2);
Try this:
If(Len(Step)>0,Step,Peek('Step2')) as Step2
Script for your sample:
Table:
LOAD Step,
StepCode,
Date,
StepCount,
If(Len(Step)>0,Step,Peek('Step2')) as Step2
FROM
[Example (3).xlsx]
(ooxml, embedded labels, table is Sheet2);
Thank You Sunny ...
Cheers !!
Regards,
Alvin.
That is an amazing answer @sunny_talwar . Genius! Thank you so much!