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
Awesome
I am glad I was able to help you.
Best,
Sunny
Hi sunindia,
Is it possible to add one more column like in the attached Excel sheet(ExpectedOutput_New)?
Please help...
This is the column you need help with -> Req_WorkDay_Count?
Yes...
If yes, then try this script:
Table:
LOAD *,
[US WD] + Alt(Peek('Req_WorkDay_Count'), 0) as Req_WorkDay_Count;
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);
Thanks So much Sunindia
also is it possible to begin the count from zero on every 1st day of the month..? any suggestions?
Use this script
Table:
LOAD *,
If(MonthName = Peek('MonthName'), [US WD] + Alt(Peek('Req_WorkDay_Count'), 0), [US WD]) as Req_WorkDay_Count;
LOAD *,
If([US WD] = 0, Alt(Peek('Required'), DAY), DAY) as Required;
LOAD DAY,
MonthName(DAY) as MonthName,
[US WD]
FROM
Community_164851.xlsx
(ooxml, embedded labels, table is Sheet1);
U are awesome! Thanks for all your help
No problem at all
Have a good day.
Best,
Sunny