Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have have uploaded source file and the expected output file.
Please help me get the desired result.
My requirement is whenever the field US WD is zero, corresponding date should be last non zero(US WD)
date like below.
Date | US WD | Expected output |
---|---|---|
05/22/2015 | 1 | 05/22/2015 |
05/23/2015 | 0 | 05/22/2015 |
05/24/2015 | 0 | 05/22/2015 |
05/25/2015 | 0 | 05/22/2015 |
05/26/2015 | 1 | 05/26/2015 |
Any suggestions appreciated.
Thanks& Regards
Jyothi
Try this:
I am not using your output file. I am creating this in the script (Changed Required to ABC)
Table:
LOAD *,
If([US WD] = 0, Alt(Peek('ABC'), DAY), DAY) as ABC;
LOAD DAY,
[US WD]
FROM
Community_164851.xlsx
(ooxml, embedded labels, table is Sheet1);
Try this script:
Table:
LOAD *,
If([US WD] = 0, Alt(Peek('Required'), DAY), DAY) as Required;
LOAD DAY,
[US WD]
FROM
Community_164851.xlsx
(ooxml, embedded labels, table is Sheet1);
Output Table Box:
Hi Sunindia,
Thanks for your reply.
How can i use the 'Required' field in the Peek function.?
I have only DAY and US WD fields in my source excel.
in Expected output excel i have manually entered 'Required' field..
Any suggestions?
Thanks
I am using Alt function here which takes care of the required not being there the 1st time. After the first row is created, you have a required field now.
Does that make sense?
Try this:
I am not using your output file. I am creating this in the script (Changed Required to ABC)
Table:
LOAD *,
If([US WD] = 0, Alt(Peek('ABC'), DAY), DAY) as ABC;
LOAD DAY,
[US WD]
FROM
Community_164851.xlsx
(ooxml, embedded labels, table is Sheet1);
Thank you for making me understand
i will try the same and let you know.
Thanks.
Sure thing.
Best,
Sunny
Awesome! Its working. I have been struggling with this since 2 days. I did a mistake by uploading in community late
Thank You so much
Jyothi
Really useful thanks