Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help

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.

DateUS WDExpected output
05/22/2015105/22/2015
05/23/2015005/22/2015
05/24/2015005/22/2015
05/25/2015005/22/2015
05/26/2015105/26/2015

Any suggestions appreciated.

Thanks& Regards

Jyothi

18 Replies
sunny_talwar

Awesome

I am glad I was able to help you.

Best,

Sunny

Not applicable
Author

Hi sunindia,

Is it possible to add one more column like in the attached Excel sheet(ExpectedOutput_New)?

Please help...

sunny_talwar

This is the column you need help with -> Req_WorkDay_Count?

Not applicable
Author

Yes...

sunny_talwar

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);



Not applicable
Author

Thanks So much Sunindia

also is it possible to begin the count from zero on every 1st day of the month..? any suggestions?

sunny_talwar

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);

Not applicable
Author

U are awesome! Thanks for all your help

sunny_talwar

No problem at all

Have a good day.

Best,

Sunny